Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use rollup.config.mjs #241

Open
fkrauthan opened this issue Jan 5, 2023 · 1 comment
Open

Can't use rollup.config.mjs #241

fkrauthan opened this issue Jan 5, 2023 · 1 comment

Comments

@fkrauthan
Copy link

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
Copy link

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()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants