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:
parent
fd931c23d1
commit
5de4aad525
@ -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",
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user