Skip to content

Commit

Permalink
fi(buffer): buffer undefined (OHIF#3590)
Browse files Browse the repository at this point in the history
  • Loading branch information
dxlin authored and Sofien-Sellami committed Oct 5, 2023
1 parent 8510eca commit 382e831
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .webpack/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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(),
],
Expand Down

0 comments on commit 382e831

Please sign in to comment.