ionic-team / rollup-plugin-node-polyfills

MIT License
139 stars 59 forks source link

`fs: true` does not work due to missing default export #11

Open allenwu1973 opened 4 years ago

allenwu1973 commented 4 years ago
[!] Error: 'default' is not exported by node_modules/rollup-plugin-node-polyfills/polyfills/buffer-es6.js, imported by node_modules/rollup-plugin-node-polyfills/polyfills/browserify-fs.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/rollup-plugin-node-polyfills/polyfills/browserify-fs.js (2:7)
1: import util$2 from 'util';
2: import buffer from 'buffer';

polyfills/buffer-es6.js is missing default export, adding this line seems to work.

export default { Buffer, INSPECT_MAX_BYTES, SlowBuffer, isBuffer, _kMaxLength: kMaxLength };
KonnorRogers commented 4 years ago

Im also running into this same issue.

Errorbot1122 commented 2 years ago

its been 2 years, how hasn't this been fixed