PepsRyuu / nollup

Rollup compatible development bundler for fast rebuilds and HMR.
MIT License
488 stars 28 forks source link

Can't use `rollup.config.mjs` #241

Open fkrauthan opened 1 year ago

fkrauthan commented 1 year ago

I wrote my rollup config in module format (hence used rollup.config.mjs as the file name). This works perfectly fine for rollup however when using nollup it complaints about the first import already import commonjs from '@rollup/plugin-commonjs'; and shows on console Invalid URL: @rollup/plugin-commonjs.

woutervanvliet commented 1 year ago

I've got the same problem, but was able to work around by using a .cjs config file with an async function as default export.

for example:


module.exports = async function() {
 const { generateBundleConfig } = await import('./my-own-module')
 return generateBundleConfig()
}