-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] Convert babel config loading to same patterns as rest of site with "onCreateBabelConfig" node api & actions setBabelPlugin and setBabelPreset #3969
Comments
Going to work on this shortly. I'll add two new actions — setBabelPlugin({
resolve: require.resolve(`babel-plugin-emotion`),
options: {
sourceMap: true,
},
}) I'll be changing the API for plugins from the non-standard I'll also pass the same stage names to Also changing the current unexpected behavior that adding a .babelrc file to your site overwrites the default babelrc settings. The new behavior will be to parse that and merge its settings in instead of replacing. I'll also be adding a |
I went with the current behavior for a few reasons.
That said, i don't think the current behavior is complete or right, it was mostly a clean simple starting point, I'm sorry i haven't gotten any updates sent on that front, just short on time, but i've started it a few times :P |
Yeah... you're right. Changed my mind on this :-) I'll make a "Customizing Babelrc" docs page as part of my PR that'll include a sample .babelrc file that replicates the default core behavior that they can copy into their site as a starting point. |
Fixed in #4298 |
@jquense – is there a strong argument for the current behavior? It's surprising when all the defaults presets/plugins disappear.
I think people should be able to extend the default config but not mutate or replace it. Gatsby breaks w/o some of our babel settings.
The text was updated successfully, but these errors were encountered: