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
How to bundle require statements from esm? #5462
Comments
You need @rollup/plugin-commonjs. If you want to use both import commonjs from '@rollup/plugin-commonjs';
export default {
input: 'index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [commonjs({
transformMixedEsModules: true
})]
}; |
@liuly0322 Have tried but still it wouldn't bundle modules imported by require statement |
Check the config file usage, are you using |
Hello,
I would like to know how to make the rollup bundle packages imported by require statement from esm.
For example,
would leave
like this so the package imported by require statement isn't bundled
How should I force it to bundle?
Thanks,
The text was updated successfully, but these errors were encountered: