browserify / randombytes

random bytes from browserify stand alone
MIT License
99 stars 47 forks source link

Webpack 5 does not provide Buffer anymore #21

Closed oliver-la closed 1 year ago

oliver-la commented 4 years ago

As reported by this user https://github.com/xama5/generate-password-browser/issues/7, webpack 5 will not provide the Buffer polyfill anymore. Documentation for this is still lacking, but I found this merged PR with that change: https://github.com/webpack/webpack/pull/8460

What's the suggested way to work around this? Should randombytes reflect this change or are people forced to implement a solution by themselves? (such as using browserify)

dcousens commented 1 year ago

@oliver-la in recent history, the solution to this is to configure your bundler to resolve Buffer with a polyfill (typically the buffer package) yourself