aboutsummaryrefslogtreecommitdiff
path: root/vnext/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-12 00:03:10 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:55 +0300
commit9ceb815fac37ed465a20b3d530c0182946483cec (patch)
tree0f436663b50fd6ac5b3b44af7bdf267b84cd50dc /vnext/webpack.config.js
parent083ba17c661f532288202e815c65976b5852926d (diff)
Webpack 5
Diffstat (limited to 'vnext/webpack.config.js')
-rw-r--r--vnext/webpack.config.js31
1 files changed, 8 insertions, 23 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index 1edb22b0..ee8b94c9 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -72,9 +72,12 @@ module.exports = (env, argv) => {
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
- loaders: [
- 'file-loader?hash=sha512&digest=hex&name=[hash].[ext]'
- ]
+ loader: 'file-loader',
+ options: {
+ hash: 'sha512',
+ digest: 'hex',
+ name: '[hash].[ext]'
+ }
}
]
},
@@ -89,7 +92,7 @@ module.exports = (env, argv) => {
filename: './index.html'
}),
new ErrorOverlayPlugin(),
- new ESLintPlugin({ failOnWarning: false, failOnError: true, fix: false })
+ new ESLintPlugin({ files: 'src', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false })
],
devServer: {
bonjour: true,
@@ -119,25 +122,7 @@ module.exports = (env, argv) => {
new OptimizeCSSAssetsPlugin({})
],
splitChunks: {
- chunks: 'all',
- minSize: 30000,
- maxSize: 0,
- minChunks: 1,
- maxAsyncRequests: 5,
- maxInitialRequests: 3,
- automaticNameDelimiter: '~',
- name: true,
- cacheGroups: {
- vendors: {
- test: /[\\/]node_modules[\\/]/,
- priority: -10
- },
- default: {
- minChunks: 2,
- priority: -20,
- reuseExistingChunk: true
- }
- }
+ chunks: 'all'
}
};
}