-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Newer versions of '@rollup/plugin-node-resolve'
don't export a traditional default module.exports = pluginFunc
any more so the pattern of require(pluginId)
doesn't work. Instead it has a .default
property on its export. It would be nice to be able to support plugins like '@rollup/plugin-node-resolve'
without resorting to a custom plugin wrapper. Maybe it could be solved by allowing a function to be passed:
import { nodeResolve } from '@rollup/plugin-node-resolve'
// ...
plugins: [nodeResolve]
or by checking for the .default
property but that might be brittle. Maybe:
let plugin = require(id);
if (typeof plugin !== 'function' && typeof plugin.default === 'function') {
plugin = plugin.default;
}
Metadata
Metadata
Assignees
Labels
No labels