From 4651bf4eb4316afd6575c4682275be91153af72f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 13 Jun 2024 13:16:18 +0100 Subject: [PATCH] Fix webpack deprecation warnings Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- recorder-worklet-loader.js | 2 +- webpack.config.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recorder-worklet-loader.js b/recorder-worklet-loader.js index 9d9958b76a..db19495674 100644 --- a/recorder-worklet-loader.js +++ b/recorder-worklet-loader.js @@ -38,7 +38,7 @@ module.exports.pitch = function pitch(request) { return cb(err); } if (entries[0]) { - return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify(entries[0].files[0])};`); + return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify([...entries[0].files][0])};`); } return cb(null, null); }); diff --git a/webpack.config.js b/webpack.config.js index 1b8f385f94..462dde351b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -657,8 +657,8 @@ module.exports = (env, argv) => { // This exports our CSS using the splitChunks and loaders above. new MiniCssExtractPlugin({ - filename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css", - chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css", + filename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css", + chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css", ignoreOrder: false, // Enable to remove warnings about conflicting order }), @@ -774,9 +774,9 @@ module.exports = (env, argv) => { // directory and symlink it into place - this allows users who loaded // an older version of the application to continue to access webpack // chunks even after the app is redeployed. - filename: "bundles/[hash]/[name].js", - chunkFilename: "bundles/[hash]/[name].js", - webassemblyModuleFilename: "bundles/[hash]/[modulehash].wasm", + filename: "bundles/[fullhash]/[name].js", + chunkFilename: "bundles/[fullhash]/[name].js", + webassemblyModuleFilename: "bundles/[fullhash]/[modulehash].wasm", }, // configuration for the webpack-dev-server