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 rollupsources).
Making the parameter optional appears to fix it, adding Plugin as a return type hopefully prevents similar issue from occurring in the future.
We're typechecking our rollup config, and TypeScript complained that
nodePolyfills()
is not conforming to thePlugin
type, as theimporter
parameter ofresolveId
can beundefined
(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.