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

[@rollup/plugin-commonjs] 12.0 multi-entry build not exposing __moduleExports #424

Closed
yyx990803 opened this issue May 28, 2020 · 2 comments

Comments

@yyx990803
Copy link

  • Rollup Plugin Name: @rollup/plugin-commonjs
  • Rollup Plugin Version: 12.0.0
  • Rollup Version: 2.11.2
  • Operating System (or Browser): macOS
  • Node Version: 14.3.0

How Do We Reproduce?

  • Building with two CJS dependencies as entries (react-is & prop-types) and output ESM versions of them
  • prop-types requires react-is - generated code uses reactIs.__moduleExports
  • generated code of react-is doesn't expose __moduleExports.

Repro: https://github.com/yyx990803/rollup-commonjs-bug

  • npm run build
  • Serve index.html on a local server

Expected Behavior

react-is code should expose __moduleExports

Actual Behavior

It doesn't.

@lukastaegert
Copy link
Member

Looks like a duplicate of #411 for which there is already a pending PR, can you check if this works for you?

@yyx990803
Copy link
Author

Yeah seems like a duplicate.

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