Skip to content

Warning about mixing default and named exports with commonjs plugin #3368

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

Open
Veetaha opened this issue Feb 4, 2020 · 1 comment
Open

Comments

@Veetaha
Copy link

Veetaha commented Feb 4, 2020

  • Rollup Version: 1.31.0
  • Operating System (or Browser): Ubuntu 18.04.3 LTS
  • Node Version: 13.7.0

How Do We Reproduce?

Open this repo and run the bootstrap commands specified in README.md

Please also take a look at original-project-commonjs.output.js. I don't know what this invocation means there

export default commonjsHelpers.unwrapExports(main);

In my minimum reproduction commonjs.output.js file there is no unwrapExports(), however the warning is still left

Expected Behavior

No warnings

Actual Behavior

I get the following warning:

~/my/junk/rollup (master) $ npx rollup -c

./main.js → ./main.bundle.js...
(!) Mixing named and default exports
https://rollupjs.org/guide/en/#output-exports
The following entry modules are using named and default exports together:
main.js

Consumers of your bundle will have to use chunk['default'] to access their default export, which may not be what you want. Use `output.exports: 'named'` to disable this warning
created ./main.bundle.js in 30ms
~/my/junk/rollup (master) $ 
@yairEO
Copy link

yairEO commented Sep 2, 2021

Might be a duplicate of #1961

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