aboutsummaryrefslogtreecommitdiff
path: root/vnext
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
parent083ba17c661f532288202e815c65976b5852926d (diff)
Webpack 5
Diffstat (limited to 'vnext')
-rw-r--r--vnext/package.json8
-rw-r--r--vnext/webpack.config.js31
2 files changed, 12 insertions, 27 deletions
diff --git a/vnext/package.json b/vnext/package.json
index c87813e0..944de45d 100644
--- a/vnext/package.json
+++ b/vnext/package.json
@@ -4,7 +4,7 @@
"description": "",
"scripts": {
"test": "jest",
- "dist": "webpack -p --progress",
+ "dist": "webpack --mode=production --progress",
"start": "webpack-dev-server"
},
"keywords": [],
@@ -31,7 +31,7 @@
"file-loader": "^6.1.1",
"html-loader": "^1.3.2",
"html-webpack-plugin": "^4.5.0",
- "jest": "^26.5.2",
+ "jest": "^26.5.3",
"mini-css-extract-plugin": "^1.0.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-loader": "^4.0.4",
@@ -40,8 +40,8 @@
"style-loader": "^2.0.0",
"stylelint": "^13.7.2",
"stylelint-config-standard": "^20.0.0",
- "webpack": "^4.44.2",
- "webpack-cli": "^3.3.12",
+ "webpack": "^5.0.0",
+ "webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.0"
},
"babel": {
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'
}
};
}