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

chore(v2): upgrade to Babel 7 #1012

Merged
merged 5 commits into from
Oct 8, 2018

Conversation

fiennyangeln
Copy link
Contributor

Motivation

#984
(Write your motivation here.)

Have you read the Contributing Guidelines on pull requests?

Yes
(Write your answer here.)

Test Plan

  1. Go to v2 folder
  2. Run yarn && yarn test
    (Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Related PRs

None
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 30, 2018
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Sep 30, 2018

Deploy preview for docusaurus-preview ready!

Built with commit 2667d3c

https://deploy-preview-1012--docusaurus-preview.netlify.com

@@ -51,7 +51,7 @@ module.exports = function createBaseConfig(props, isServer) {
.loader('babel-loader')
.options({
babelrc: false,
presets: ['env', 'react'],
presets: ['@babel/env', '@babel/react'],
plugins: [isServer ? 'dynamic-import-node' : 'syntax-dynamic-import'],
Copy link
Contributor

@endiliey endiliey Oct 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't really tried this out but i think the dynamic import node babel plugin is not compatible with babel 7.

See airbnb/babel-plugin-dynamic-import-node#64

Happening in CRA as well

facebook/create-react-app#4984

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fiennyangeln Can you verify this? What do we do about this then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yangshun yes, the PR for babel 7 upgrade for that plugin is still open. How about using https://www.npmjs.com/package/babel-plugin-transform-dynamic-import instead?

@@ -1,3 +1,4 @@
import '@babel/polyfill';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it fails without this ? O.O

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@endiliey endiliey changed the title Upgrade babel in v2 folder chore(v2): upgrade to Babel 7 Oct 3, 2018
@yangshun
Copy link
Contributor

yangshun commented Oct 4, 2018

@fiennyangeln Let us know when this is good to review again.

@fiennyangeln
Copy link
Contributor Author

@yangshun please review 😄

@yangshun
Copy link
Contributor

yangshun commented Oct 8, 2018

@fiennyangeln The tests are failing 😓

@fiennyangeln
Copy link
Contributor Author

Ah sorry! I guess the changing of import order mess it all, reverted it back @yangshun

Copy link
Contributor

@endiliey endiliey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants