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',