FredKSchott / rollup-plugin-polyfill-node

A modern Node.js polyfill for your Rollup bundle.
Other
175 stars 55 forks source link

Type fix: implement plugin interface #28

Closed ab-pm closed 2 years ago

ab-pm commented 3 years ago

We're typechecking our rollup config, and TypeScript complained that nodePolyfills() is not conforming to the Plugin type, as the importer parameter of resolveId can be undefined (see rollup sources).

Making the parameter optional appears to fix it, adding Plugin as a return type hopefully prevents similar issue from occurring in the future.