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
Instantiate presets before plugins #11689
Instantiate presets before plugins #11689
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit eab3c06:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/29658/ |
790d0b8
to
17ebbf4
Compare
17ebbf4
to
a65b757
Compare
Wow, preset ordering is hard. They sometimes run bottom to top, and sometimes top to bottom 🙃 |
d8cc7ec
to
3285782
Compare
"five;", | ||
"six;", | ||
"twentyone;", | ||
"twentytwo;", |
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.
Before the last commit, this was
twentyone
twentytwo
five
six
And it was causing a failure in the CRA e2e test.
@@ -199,12 +188,32 @@ export default gensync<[any], ResolvedConfig | null>(function* loadFullConfig( | |||
.map(plugins => ({ plugins })); | |||
opts.passPerPreset = opts.presets.length > 0; | |||
|
|||
if (context.filename?.includes("RuntimeErrorContaine")) { | |||
console.log(initialPluginsDescriptors.map(p => p.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.
🤔Is that for debug purpose?
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 🙃
I'll remove it tomorrow
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.
LGTM other than a nit.
I'm marking this as "do not merge" until I finish the other PR, so that I'm sure that what I did here is only and everything I need. |
48b104e
to
eab3c06
Compare
Merging into |
This is only needed for #12151, but I'm sending them as two separate PR to make it easier to review them one by one (since the diffs overlap, but are conceptually separate).
The e2e failure makes me think that I got plugins ordering wrong, I'll check.