-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffer is not defined, Platform React JS #266
Comments
Hi did you follow the instructions here https://github.com/NathanaelA/fluentreports/tree/master/generator Specifically creating the browser version of the code base: If you are doing server only, then Node provides "Buffer" |
Yeah I tried it again and it works.. |
The |
Steps to reproduce.
npm i fluentreports
Sample Data
Adding plugins section with ProviderPlugin into webpack.config.js:
module.exports = {
// ...
plugins: [
// Work around for Buffer is undefined:
// https://github.com/Buffer removed, it cause some trouble webpack/changelog-v5#10
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
]
Also add in resolve.fallback into webpack.config.js :
resolve: {
extensions: [ '.ts', '.js' ],
fallback: {
"stream": require.resolve("stream-browserify"),
"buffer": require.resolve("buffer")
}
}
The text was updated successfully, but these errors were encountered: