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

Provide esm entry point for react-is #13321

Closed
wants to merge 10 commits into from
Closed

Provide esm entry point for react-is #13321

wants to merge 10 commits into from

Commits on Sep 1, 2018

  1. Provide esm entry point for react-is

    Refs
      #13272 (comment)
      reactjs/rfcs#38
    
    In this PR I modified build script to generate two more bundles
    `react-is.development.mjs` and `react-is.production.min.mjs` and
    entry point `index.mjs` which reexports all named values depending on
    production/development environments like this
    
    ```
    import * as dev from './esm/development.mjs'
    import * as prod from './esm/production.min.mjs'
    
    export var name =
      process.env.NODE_ENV !== 'production' ? dev.name : prod.name;
    ```
    
    I replaced closure wrapper with vendor plugin which is able to process
    es modules by replacing them before and returning them after closure
    minification.
    
    To prove treeshakability of dual entry point we can generate rollup
    bundle with `import {} from 'package'`. If nothing will left then
    user bundler is able to eliminate unused code from dual entry point.
    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    d835451 View commit details
    Browse the repository at this point in the history
  2. Fix lint

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    e5ddad6 View commit details
    Browse the repository at this point in the history
  3. Remove mjs

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    f443090 View commit details
    Browse the repository at this point in the history
  4. Fix paths

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    759d721 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b4ee260 View commit details
    Browse the repository at this point in the history
  6. Remove strict mode from mjs

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    14ab10a View commit details
    Browse the repository at this point in the history
  7. Fix bundles lint

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    a6d8b5a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1d5696d View commit details
    Browse the repository at this point in the history
  9. Fix lint

    TrySound committed Sep 1, 2018
    Configuration menu
    Copy the full SHA
    10b66ce View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2018

  1. Configuration menu
    Copy the full SHA
    cd28c7a View commit details
    Browse the repository at this point in the history