rollup-plugin-polyfill-node
rollup-plugin-polyfill-node copied to clipboard
Fix buffer-es6 polyfill: Cannot set properties of undefined (setting 'TYPED_ARRAY_SUPPORT')
See [(https://github.com/parcel-bundler/parcel/issues/2833)] I've tried so many ways to prevent this error and finally found this approach to solve it.
can you move the code back to it's original location, so that the diff is more clear? Also, remove the nuxt settings config file change!
Actually I only change the code order but not content. In my case, the order matters. Function Buffer() needs to be placed before Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : true;
Also, I remove the vscode nuxt setting. Thanks for reminding.