FredKSchott / rollup-plugin-polyfill-node

A modern Node.js polyfill for your Rollup bundle.
Other
179 stars 57 forks source link

feat: add support for "node:" prefixed modules #89

Open dmnsgn opened 1 month ago

dmnsgn commented 1 month ago

This PR add support for the node: protocol.

It has the same goal as this other PR #85 but different implementation: here I just extend the list of modules by adding items to the libs Map while the other PR updates the importee in the plugins' resolveId. If there are a lot of modules to resolve, it might be slightly faster to get them from the libs Map and not go through if+startsWith+replace. Open to discussion which is best.

Closes #84