Use rollup-plugin-node-polyfills instead of node-globals+node-builtins #11098
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#10747 is currently blocked by calvinmetcalf/rollup-plugin-node-globals#34, which is using an old acorn version which doesn't support Node 10 features.
There are three different PRs to update acorn in that package:
However, the last release was in Sept 2018.
In this PR, I am replacing it with
rollup-plugin-node-polyfills
: it's a fork ofrollup-plugin-node-builtins
(used for built-in modules) which also polyfills global Node variables, maintained by the author of the second PR I linked.It seems that the readme is still a copy of
rollup-plugin-node-builtins
, but looking at the source code and at rollup/rollup#2881 it seems to be exactly what we want.PS. @manucorporat Are there any plans to move the plugin to https://github.com/rollup/plugins? Your plugin seems to be a fundamental piece of the ecosystem, and it would make sense to move it to the rollup org.