fi(buffer): buffer undefined (#3590)

This commit is contained in:
dxlin authored and GitHub committed 2023-08-29 11:20:01 -04:00
1 parent 9fbdf37f44
commit 75f61f85fe
1 file changed
+9 -1
+9 -1
View File
@@ -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(),
],