exclude bitwarden modules from vendor

This commit is contained in:
Kyle Spearrin 2018-01-08 12:15:45 -05:00
parent fd931c23d1
commit 5de4aad525
2 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"dev": "gulp build && webpack --config webpack.dev.js",
"dev:watch": "gulp build && webpack --config webpack.dev.js --watch",
"prod": "gulp build && webpack --config webpack.prod.js",
"dist": "gulp build && webpack --config webpack.prod.js && gulp dist",
"dist": "npm run prod && gulp dist",
"lint": "tslint src/**/*.ts || true",
"lint:fix": "tslint src/**/*.ts --fix",
"test": "karma start --single-run",

View File

@ -5,8 +5,13 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const isVendorModule = (module) => {
// returns true for everything in node_modules
return module.context && module.context.indexOf('node_modules') !== -1;
if (!module.context) {
return false;
}
const nodeModule = module.context.indexOf('node_modules') !== -1;
const bitwardenModule = module.context.indexOf('@bitwarden') !== -1;
return nodeModule && !bitwardenModule;
};
module.exports = {