-
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
chore(gatsby): convert babel-loader-helpers to typescript #36237
chore(gatsby): convert babel-loader-helpers to typescript #36237
Conversation
…atsby-babel-loader-helpers
…atsby-babel-loader-helpers
…atsby-babel-loader-helpers
Having trouble merging master in, so just making a quick change to try to trigger builds. 😄
…atsby-babel-loader-helpers
…ornil/gatsby into typescript-gatsby-babel-loader-helpers
Hi @j0sh77, I've seen the e2e tests failing so I re-merged the master branch, but I see the tests not starting again. Should I just re-cherry-pick your commits to kick off the build? |
Yeah, there seems to be an issue with builds kicking off commits from forked repos? The production runtime e2e tests are flaky, and the react 18 ones are perpetual failures at this point. We're hoping to get those addressed soon, but you can ignore them for the time being. Again, thank you so much for this PR and taking the time to rebase. 💜 |
Thank you for your answer, that explained a lot! I see now only one react_18 test is failing (remote-file.js). |
pluginBabelConfig.stages[stage].plugins.forEach(plugin => { | ||
reduxPlugins.push( | ||
babel.createConfigItem([resolve(plugin.name), plugin.options], { | ||
dirname: plugin.name, |
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.
I think adding the dirname
is ok here, but should we keep the name
key as well?
https://github.com/babel/babel/blob/main/packages/babel-core/src/config/item.ts
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.
I was going to leave it but the types from babel changed and no longer include it.
The createConfigItem
method that we use here comes from this type https://github.com/babel/babel/blob/main/packages/babel-core/src/config/item.ts#L28 and it now accepts only dirname
and type
.
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.
Looking at the current babel docs and previous versions the createConfigItem now has these parameters so changing them feels correct (and not adding invalid name
key)
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 again for your patience, understanding, and contribution to Gatsby! 💜
Description
Convert babel-loader-helpers to TS.
Documentation
Related Issues
Previous PR was forgotten and recently closed, as suggested in the closing message, I updated the code and re-opened it. #25100