Open gavinmcfarland opened 3 years ago
This plugin only polyfills node native modules, not globals
Hi @remorses, so just to confirm it doesn't polyfill process
? Because the readme suggests it does.
Hi @gavinmcfarland - did you get anywhere with this? facing the same issue
It was a while since I looked at it, but I think I did get it working, I remember something about the documentation being hard to understand.
I might have done...
export default [{
// ...
plugins: [
typescript(),
nodePolyfills({ include: null}),
commonjs()
]
}];
Or I might have passed in {process: true}
. The original repo suggests you can turn individual built-ins on and off.
https://github.com/ionic-team/rollup-plugin-node-polyfills
Hi, you might already be aware of this. I can't get
process.cwd()
to work and I'm not sure if there is a missing option I need to pass in for it to work. I can see that it exists in the source code. I think this is probably an issue fromrollup-plugin-node-polyfills
because it doesn't work in that either.After setting up rollup and the required plugins it doesn't polyfill
process.cwd()
.