Add Buffer and VM fallbacks to Webpack configuration

Update webpack.config.js to include 'buffer' and 'vm' in resolve.fallback and correctly configure ProvidePlugin for Buffer, resolving the "Buffer is not defined" error and a related 'vm' warning.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2501b04e-77c8-4f06-a13c-75c232bafd47
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 970a879c-45e0-48b9-bed1-d9e23d410f4a
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/2501b04e-77c8-4f06-a13c-75c232bafd47/rAsiAu1
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
bewest
2026-01-19 13:14:21 -08:00
committed by Ben West
parent 4a52653fd0
commit e2771d4df8
+4 -1
View File
@@ -54,6 +54,7 @@ pluginArray.push(new webpack.ProvidePlugin({
pluginArray.push(new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}));
// limit Timezone data from Moment
@@ -163,7 +164,9 @@ module.exports = {
resolve: {
fallback: {
'process/browser': require.resolve('process/browser'),
events: require.resolve('events/')
events: require.resolve('events/'),
buffer: require.resolve('buffer/'),
vm: false
},
alias: {
stream: 'stream-browserify',