1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-04 18:37:45 +01:00

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": "gulp build && webpack --config webpack.dev.js",
"dev:watch": "gulp build && webpack --config webpack.dev.js --watch", "dev:watch": "gulp build && webpack --config webpack.dev.js --watch",
"prod": "gulp build && webpack --config webpack.prod.js", "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": "tslint src/**/*.ts || true",
"lint:fix": "tslint src/**/*.ts --fix", "lint:fix": "tslint src/**/*.ts --fix",
"test": "karma start --single-run", "test": "karma start --single-run",

View File

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