Roll back to Webpack 4 due to issues with 5 migration.

This commit is contained in:
Gareth Latty
2020-10-11 15:58:20 +01:00
parent 6d8af358ac
commit 14a1751452
4 changed files with 1553 additions and 96 deletions
@@ -25,8 +25,6 @@ jobs:
uses: actions/checkout@v2
- name: Get version from tag.
uses: olegtarasov/get-tag@v1
- name: Cache docker layers.
uses: satackey/action-docker-layer-caching@v0.0.8
continue-on-error: true
- name: Build image.
run:
+1538 -91
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -76,7 +76,7 @@
"ts-loader": "^8.0.4",
"tsickle-loader": "^0.5.0",
"typescript": "^4.0.3",
"webpack": "^5.0.0",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
}
+14 -2
View File
@@ -120,6 +120,7 @@ module.exports = (env, argv) => {
// compressionOptions: { level: 11 }
// })
);
plugins.push(new webpack.HashedModuleIdsPlugin());
}
return {
@@ -135,7 +136,10 @@ module.exports = (env, argv) => {
output: {
path: dist,
publicPath: "/",
filename: "assets/scripts/[name].[contenthash].js",
filename:
mode === "production"
? "assets/scripts/[name].[chunkhash].js"
: "assets/scripts/[name].[hash].js",
},
module: {
rules: [
@@ -229,8 +233,16 @@ module.exports = (env, argv) => {
},
plugins: plugins,
optimization: {
moduleIds: "deterministic",
runtimeChunk: "single",
splitChunks: {
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
name: "vendors",
chunks: "all",
},
},
},
minimizer: [
new ClosurePlugin(
{