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
Pass assumptions set in presets to plugins #13321
Pass assumptions set in presets to plugins #13321
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/46185/ |
Thank you for the quick fix, @nicolo-ribaudo! ❤️ (The |
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 f1ab26e:
|
@@ -68,10 +68,9 @@ export default gensync<(inputOpts: unknown) => ResolvedConfig | null>( | |||
throw new Error("Assertion failure - plugins and presets exist"); | |||
} | |||
|
|||
const pluginContext: Context.FullPlugin = { | |||
const presetContext: Context.FullPreset = { |
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.
Will presetContext.assumptions
be undefined
?
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, but it doesn't matter because the preset API doesn't have a method to read assumptions anyway.
The problem was that we where building the plugin API context using
assumptions
coming from the config options, completely ignoring theassumptions
set by presets.