-
-
Notifications
You must be signed in to change notification settings - Fork 26.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
Create .babelrc file on eject #602
Conversation
@@ -9,38 +9,66 @@ | |||
*/ | |||
// @remove-on-eject-end | |||
|
|||
|
|||
// After eject | |||
module.exports = function () { |
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.
This file existing in a trimmed down state is somewhat confusing. Can we embed this single option into the Webpack config and instead branch there? You could use Object.assign()
to merge options if necessary.
@@ -88,10 +70,31 @@ prompt( | |||
}; | |||
|
|||
fs.writeFileSync( | |||
path.join(appPath, 'config', '.babelrc'), | |||
path.join(ownPath, 'config', '.babelrc'), |
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.
Needs to be changed so that a file isn't created in ownPath
Sorry for the churn, transitioning to a monorepo was a big but necessary change. |
Cool, l think that will be much better. |
I’m closing in favor of the approach in #705. Sorry this PR didn’t get in! I hope this doesn’t discourage you from future contributions. |
Attempt at addressing #410
After ejecting, a
.babelrc
file is generated and extended in the app'spackage.json
. This means additional config options can be added in a familiar way. Additionally, editor plugins that rely on a standard babel config setup will work.babel.dev.js
andbabel.prod.js
are modified to export functions which conditionally userequire.resolve()
for paths.The generated
.babelrc
uses theenv
flag to separate development and production configs. The configs are similar, but I haven't merged them to keep them extensible, and the pull request simpler.Edit: e2e now passes