Skip to content

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

Closed

Description

@yyx990803
  • 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.

Activity

  1. lukastaegert commented on May 29, 2020

    @lukastaegert
    Member

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

  2. yyx990803 commented on May 30, 2020

    @yyx990803
    Author

    Yeah seems like a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions