From https://github.com/pikapkg/snowpack/discussions/911
/cc @benoitg
This is a good followup for #854 - how far do we go in polyfilling
process? We should just take the snippet that we return in https://github.com/pikapkg/snowpack/edit/master/snowpack/src/rollup-plugins/rollup-plugin-node-process-polyfill.ts & replace it with the Rollup polyfill in its entirety (https://github.com/ionic-team/rollup-plugin-node-polyfills/blob/master/polyfills/process-es6.js) so that we keep parity and also don't have to keep addressing one offs like this one.
const polyfillPath = require.resolve('rollup-plugin-node-polyfills/polyfills/process-es6.js');
const polyfillCode = fs.readFileSync(polyfillPath, 'utf-8');
...
return `/* SNOWPACK POLYFILL - process */\n${polyfillCode}`;
Will be covered by existing snapshot tests.
I would like to try it
Awesome! @MoonBall Thanks so much for jumping into these issues and helping out with PRs this last week, I really appreciate it!
PS: Do you have a Twitter? I gave you a shout out last weekend on Twitter for your contributions to the 2.9 release, but with your GH username: https://twitter.com/pikapkg/status/1297616824960352256
Thanks for your praise. Let's make snowpack better.
PS: Do you have a Twitter?
My Twitter is @MoonBall_cxy.
@MoonBall I just tested 2.9.3. I can confirm this issue is fixed by #920
Most helpful comment
@MoonBall I just tested 2.9.3. I can confirm this issue is fixed by #920