diff --git a/.webpack/webpack.base.js b/.webpack/webpack.base.js index 347c02de226..5de575af8df 100644 --- a/.webpack/webpack.base.js +++ b/.webpack/webpack.base.js @@ -131,7 +131,12 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => { extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '*'], // symlinked resources are resolved to their real path, not their symlinked location symlinks: true, - fallback: { fs: false, path: false, zlib: false }, + fallback: { + fs: false, + path: false, + zlib: false, + "buffer": require.resolve("buffer") + }, }, plugins: [ new webpack.DefinePlugin({ @@ -155,6 +160,9 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => { process.env.REACT_APP_I18N_DEBUG || '' ), }), + new webpack.ProvidePlugin({ + Buffer: ['buffer', 'Buffer'], + }), // Uncomment to generate bundle analyzer // new BundleAnalyzerPlugin(), ],