webpack / node-libs-browser

[DEPRECATED] The node core libs for in browser usage.
MIT License
449 stars 78 forks source link

Buffer is broken for target: "webworker" #60

Open haggholm opened 7 years ago

haggholm commented 7 years ago

The buffer module currently used (v4) performs a check of a variable explicitly on the global variable, something like if(global.TYPED_ARRAY_SUPPORT). As mentioned in #31, global is not polyfilled—at least it isn’t when building a Webpack bundle for the webworker target. As a result, code that relies on Webpack polyfilling the buffer module will break in webworkers.

This can be trivially fixed by updating to the latest version of the buffer module (5), but in #45 it seems that sticking to an older version is a deliberate decision.