From 3ee67cddd29104c48afe348bab16181bfff5e2f7 Mon Sep 17 00:00:00 2001 From: Adrian Petrescu Date: Sun, 14 Aug 2022 18:45:55 -0400 Subject: [PATCH] Upgrade to Shudan 1.7.x (#883) * Update to Webpack 5 Webpack 4 fails to parse the nullish coalescing operator '??' which Shudan 1.7.0 uses. * Bump Shudan 1.7.1 * Remove preact alias Co-authored-by: Yichuan Shen --- package.json | 6 +++--- webpack.config.js | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 746fb4682..5366eda9b 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@sabaki/immutable-gametree": "^1.9.4", "@sabaki/influence": "^1.2.2", "@sabaki/sgf": "^3.4.7", - "@sabaki/shudan": "^1.5.4", + "@sabaki/shudan": "^1.7.1", "argv-split": "^2.0.1", "classnames": "^2.2.6", "dolm": "^0.7.3-beta", @@ -122,8 +122,8 @@ "prettier": "1.19.1", "react": "^16.13.1", "tmp": "^0.1.0", - "webpack": "^4.42.1", - "webpack-cli": "^3.3.11" + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0" }, "scripts": { "test": "mocha --require esm", diff --git a/webpack.config.js b/webpack.config.js index 11a86ad4b..1e656e315 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,7 @@ module.exports = (env, argv) => ({ path: __dirname }, - devtool: argv.mode === 'production' ? false : 'cheap-module-eval-source-map', + devtool: argv.mode === 'production' ? false : 'eval-cheap-module-source-map', target: 'electron-renderer', node: { @@ -21,10 +21,6 @@ module.exports = (env, argv) => ({ argv.mode === 'production' ? path.join(__dirname, 'node_modules/preact/dist/preact.min.js') : 'preact', - preact: - argv.mode === 'production' - ? path.join(__dirname, 'node_modules/preact/dist/preact.min.js') - : 'preact', 'prop-types': path.join(__dirname, 'src/modules/shims/prop-types.js') } },