From b587fd422d60f0d939dbf3e7aec70eee0ced6d75 Mon Sep 17 00:00:00 2001 From: Zerebos Date: Mon, 27 Mar 2023 09:30:56 -0400 Subject: [PATCH] Fix webpack builds for modern versions (#333) --- webpack.main.js | 8 ++++---- webpack.renderer.js | 20 ++++++++------------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/webpack.main.js b/webpack.main.js index 216a7c8c..dde70b23 100644 --- a/webpack.main.js +++ b/webpack.main.js @@ -1,5 +1,5 @@ -module.exports = { - output: { - hashFunction: "xxhash64" - } +module.exports = config => { + delete config.optimization.namedModules; + config.output.hashFunction = "xxhash64"; + return config; }; \ No newline at end of file diff --git a/webpack.renderer.js b/webpack.renderer.js index b0d35619..9f6290b2 100644 --- a/webpack.renderer.js +++ b/webpack.renderer.js @@ -1,13 +1,9 @@ -module.exports = { - module: { - rules: [ - { - test: /\.(html|svelte)$/, - use: "svelte-loader" - } - ] - }, - output: { - hashFunction: "xxhash64" - } +module.exports = config => { + delete config.optimization.namedModules; + config.output.hashFunction = "xxhash64"; + config.module.rules.push({ + test: /\.(html|svelte)$/, + use: "svelte-loader" + }); + return config; }; \ No newline at end of file