fi(buffer): buffer undefined (#3590)

This commit is contained in:
dxlin 2023-08-29 11:20:01 -04:00 committed by GitHub
parent 9fbdf37f44
commit 75f61f85fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(),
],