From 010bc3b8d8d70947f4dc09bc1c67cf5df9dfd1b5 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Wed, 8 Sep 2021 15:37:29 +0200 Subject: [PATCH] Replace node polyfills configuration with dummy fallback They removed default polyfills but some dependecies require those so this replaces those modules. See https://webpack.js.org/migrate/5/#clean-up-configuration [MAILPOET-3214] --- webpack.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 9ed05d05e8..c98bea4e11 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,6 +41,9 @@ const baseConfig = { 'node_modules', 'assets/js/src', ], + fallback: { + fs: false, + }, extensions: ['.js', '.jsx', '.ts', '.tsx'], alias: { 'handlebars': 'handlebars/dist/handlebars.js', @@ -56,9 +59,6 @@ const baseConfig = { 'asyncqueue': 'vendor/jquery.asyncqueue.js', }, }, - node: { - fs: 'empty' - }, plugins: [], module: { noParse: /node_modules\/lodash\/lodash\.js/, @@ -351,6 +351,9 @@ const testConfig = { 'blob$': 'blob-tmp/Blob.js', 'wp-js-hooks': path.resolve(__dirname, 'assets/js/src/hooks.js'), }, + fallback: { + fs: false, + }, }, externals: { 'jquery': 'jQuery',