-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
fix: require babel dependencies directly #1575
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 54c9e1b |
Deploy preview for docusaurus-preview ready! Built with commit 54c9e1b |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Some changes that need to be made before we can proceed:
- Since you've read the contributing guidelines - please follow the Semantic Commit Messages
- The CI checks are failing
- The PR need a clearer title that explains the PR - this will eventually become the commit message if/when merged
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
**What it does:** - Directly require babel dependencies instead of asking babel to do it.
Hello yangshun, Thanks for the feedbacks, I've updated the PR title, the commit message and linted the files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,10 +13,13 @@ require('@babel/register')({ | |||
only: [__dirname, `${process.cwd()}/core`], | |||
plugins: [ | |||
require('./server/translate-plugin.js'), | |||
'@babel/plugin-proposal-class-properties', | |||
'@babel/plugin-proposal-object-rest-spread', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the default really needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to crash otherwise, something like "default is not a valid property for a plugin".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes because the modules are coded to be used with es6 imports syntax when babel requires commonJS imports.
Motivation
FIX #1574
Have you read the Contributing Guidelines on pull requests? YES
Test Plan
Related PRs
This is a fix, it shouldn't require any updates in the documentation.