You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
Rollup allows external to be a function. However, after adding this plugin, an error is thrown:
[!] TypeError: options$1.external.indexOf is not a function
TypeError: options$1.external.indexOf is not a function
at isExternal (.../node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:730:86)
at .../node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:734:46
at .../node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:631:32
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:684:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
The text was updated successfully, but these errors were encountered:
Looking into this more, it turns out that another plugin being added after this was modifying the options.external property. The real issue is that when this logic first runs, Array.isArray( options$1.external ) might be true, but might not be when the isExternal logic runs.
I've changed the order of my plugins and it seems to work fine, but this feels like an easy thing to check against.
Yeah, the Array.isArray( options.external ) could be moved inside the arrow function, so that if options.external already is a function, there's still a wrapper function added. I wouldn't trust these options to not change during runtime, either.
Rollup allows
external
to be a function. However, after adding this plugin, an error is thrown:The text was updated successfully, but these errors were encountered: