-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Updated example to match babel 7 recommendation. #10867
Conversation
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Decrease detected ✓)General
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles Overall decrease ✓
|
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Decrease detected ✓)General
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles Overall decrease ✓
|
From babel docs regarding json configuration:
JSON configuration should work, if it doesn't then that's a bug, but we shouldn't be recommending JS config over it. If the example is broken a PR is welcome to fix it, but looks like this is not the case:
I'm closing the PR for now as we don't need the change, thank you!. |
Reason
After working on a project, I had issues adding Jest for testing. After research I realized
babel.config.js
is the recommended way on configuring babel after Babel 7 which jest also recommendsOther people had this problem and this comment shows that changing to
babel.config.js
solved the problem for many developers.To show that you can use
babel.config.js
for custom babel configuration, I updated the example.Please, note that the docs should be updated accordingly, to let people know they can also use
babel.config.js
(not sure if I should have created an issue for that).