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

Create .babelrc file on eject #602

Closed
wants to merge 7 commits into from
Closed

Create .babelrc file on eject #602

wants to merge 7 commits into from

Conversation

jamesblight
Copy link
Contributor

@jamesblight jamesblight commented Sep 7, 2016

Attempt at addressing #410

After ejecting, a .babelrc file is generated and extended in the app's package.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 and babel.prod.js are modified to export functions which conditionally use require.resolve() for paths.

The generated .babelrc uses the env 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

@ghost ghost added the CLA Signed label Sep 7, 2016
@@ -9,38 +9,66 @@
*/
// @remove-on-eject-end


// After eject
module.exports = function () {
Copy link
Contributor

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.

@ghost ghost added the CLA Signed label Sep 12, 2016
@@ -88,10 +70,31 @@ prompt(
};

fs.writeFileSync(
path.join(appPath, 'config', '.babelrc'),
path.join(ownPath, 'config', '.babelrc'),
Copy link
Contributor Author

@jamesblight jamesblight Sep 13, 2016

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

@gaearon
Copy link
Contributor

gaearon commented Sep 21, 2016

Sorry for the churn, transitioning to a monorepo was a big but necessary change.
I think this might now be better addressed as a part of #674.

@jamesblight
Copy link
Contributor Author

Cool, l think that will be much better.

@gaearon
Copy link
Contributor

gaearon commented Sep 22, 2016

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.

@gaearon gaearon closed this Sep 22, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants