-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Closed
Commits on Sep 1, 2018
-
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.
Configuration menu - View commit details
-
Copy full SHA for d835451 - Browse repository at this point
Copy the full SHA d835451View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5ddad6 - Browse repository at this point
Copy the full SHA e5ddad6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f443090 - Browse repository at this point
Copy the full SHA f443090View commit details -
Configuration menu - View commit details
-
Copy full SHA for 759d721 - Browse repository at this point
Copy the full SHA 759d721View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4ee260 - Browse repository at this point
Copy the full SHA b4ee260View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14ab10a - Browse repository at this point
Copy the full SHA 14ab10aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6d8b5a - Browse repository at this point
Copy the full SHA a6d8b5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d5696d - Browse repository at this point
Copy the full SHA 1d5696dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10b66ce - Browse repository at this point
Copy the full SHA 10b66ceView commit details
Commits on Sep 2, 2018
-
Configuration menu - View commit details
-
Copy full SHA for cd28c7a - Browse repository at this point
Copy the full SHA cd28c7aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.