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

namedExports option missing #437

Closed
2 of 4 tasks
matthew-dean opened this issue Jun 4, 2020 · 5 comments
Closed
2 of 4 tasks

namedExports option missing #437

matthew-dean opened this issue Jun 4, 2020 · 5 comments

Comments

@matthew-dean
Copy link

matthew-dean commented Jun 4, 2020

  • Rollup Plugin Name: commonjs
  • Rollup Plugin Version: latest

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

In the Rollup documentation (https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module), it says:

This error frequently occurs with CommonJS modules converted by @rollup/plugin-commonjs, which makes a reasonable attempt to generate named exports from the CommonJS code but won't always succeed, because the freewheeling nature of CommonJS is at odds with the rigorous approach we benefit from in JavaScript modules. It can be solved by using the namedExports option, which allows you to manually fill in the information gaps.

I have the error described Error: "[name] is not exported by [module]" but there is no namedExports option. This link provided goes nowhere: https://github.com/rollup/plugins/tree/master/packages/commonjs#custom-named-exports

Your Proposal for Changes

Either document namedExports or update the Rollup documentation to clarify how to solve this issue without it.

@shellscape
Copy link
Collaborator

That option was deprecated and has now been removed in a recent PR. It looks like your issue is with the rollup documentation and not the plugin itself. That being the case, you should open a docs issue on rollup/rollup instead.

@matthew-dean
Copy link
Author

@shellscape It's not a documentation issue. I looked at the code for the commonjs plugin, and it says that namedExports are now handled automatically. However, for this file, it fails. Is there a way to resolve this?

@shellscape
Copy link
Collaborator

We don't offer support here (as the issue templates all say - they also have links to support options). If you think it's a bug, please open an issue using the bug template and make sure to fill out all fields.

@matthew-dean
Copy link
Author

@shellscape Very well: #438

@liajoy
Copy link

liajoy commented Jan 14, 2021

Is there a alternative option for namedExports?

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

3 participants