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