-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Convert Vite plugin adapter
API to presets
#8620
Conversation
🦋 Changeset detectedLatest commit: 08ebfc2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
adapter
API to presets
...(mergeRequired("presets") | ||
? { | ||
presets: [...(configA.presets ?? []), ...(configB.presets ?? [])], | ||
} | ||
: {}), |
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 don't think we want to support merging presets
. Presets should all be declared upfront. That could also simplify updateRemixPluginContext
where omit
is called for presets
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.
This code is currently not used since we never attempt to merge two configs that both have presets. Currently only user configs can have them. I only included it here for completeness in case this function ever ends up being public API.
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
This PR makes the following changes:
adapter
API into a more generalpresets
API, supporting an array of preset objects that can define config to be merged with defaults before the user config is applied at the end.loadContext
andviteConfig
options from the oldadapter
API.remixConfigResolved
hook to the preset which provides support for config validation after all presets have been applied.name
property to presets so that we can roll out improved error messaging support to the newremixConfigResolved
hook in the future.buildEnd
option available as a top-level option, not just for adapters.Note that the documentation for preset authors is pretty light right now while this feature is still fresh. I'll add more docs as a follow-up, but the priority is to get this out for now.