-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add babel-transform-runtime to browser builds #3476
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3476 +/- ##
=======================================
Coverage 62.23% 62.23%
=======================================
Files 181 181
Lines 6692 6692
Branches 5 5
=======================================
Hits 4165 4165
Misses 2525 2525
Partials 2 2 Continue to review full report at Codecov.
|
Seems reasonable :) |
@cpojer will you do a beta release of this? |
Published |
Seems like https://travis-ci.org/ReactTraining/react-media/builds/229092780#L786-L787 |
If I remember correctly, the problem is that |
So should we actually do a rollup build instead of babel for es5/browser? That might solve these issues. And make the babel runtime dependency hidden. |
We should also add a test to this repo that runs in a browser |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Related to #3360.
#3421 introduced additional es5 builds of speciic Jest packages meant for use in browsers. But as
async/await
is used some places (and possibly other ES6 feature), the transpilation was missingtransform-runtime
in order to work for consumers.Alternatives to this solution
async/await
(and possibly other es6 features) in packages likejest-matchers
Should be noted that this proposed solution needs the consumer to install
babel-runtime
. This should be documented when browser support is made public.Test plan
Do a beta build and test on ReactTraining/react-media#61