mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
exclude bitwarden modules from vendor
This commit is contained in:
parent
fd931c23d1
commit
5de4aad525
@ -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",
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user