mirror of
https://github.com/bitwarden/browser
synced 2025-01-23 09:42:06 +01:00
webpack adjustments
This commit is contained in:
parent
dabc37a1ef
commit
7aa4450556
@ -61,6 +61,11 @@ const moduleRules = [
|
||||
publicPath: '../',
|
||||
}),
|
||||
},
|
||||
// Hide System.import warnings. ref: https://github.com/angular/angular/issues/21560
|
||||
{
|
||||
test: /[\/\\]@angular[\/\\].+\.js$/,
|
||||
parser: { system: true }
|
||||
},
|
||||
];
|
||||
|
||||
const plugins = [
|
||||
@ -93,10 +98,6 @@ const plugins = [
|
||||
{ from: './src/app-id.json' },
|
||||
{ from: './src/images', to: 'images' },
|
||||
]),
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: '[name].js.map',
|
||||
include: ['app/main.js'],
|
||||
}),
|
||||
extractCss,
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
@ -133,6 +134,7 @@ const serve = {
|
||||
|
||||
const config = {
|
||||
mode: ENV,
|
||||
devtool: 'source-map',
|
||||
serve: serve,
|
||||
entry: {
|
||||
'app/main': './src/app/main.ts',
|
||||
@ -151,18 +153,6 @@ const config = {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
test: isVendorModule,
|
||||
name: 'app/vendor',
|
||||
chunks: 'initial',
|
||||
enforce: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
module: { rules: moduleRules },
|
||||
plugins: plugins,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user