From 75f61f85fe2a21d8988b1b34ea74cf9d6d78ea0b Mon Sep 17 00:00:00 2001 From: dxlin Date: Tue, 29 Aug 2023 11:20:01 -0400 Subject: [PATCH] fi(buffer): buffer undefined (#3590) --- .webpack/webpack.base.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.webpack/webpack.base.js b/.webpack/webpack.base.js index 347c02de2..5de575af8 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(), ],