fix: change ResolvedConfig type to interface to allow extending it#19210
Merged
patak-cat merged 3 commits intovitejs:mainfrom Jan 23, 2025
lazuee:main
Merged
fix: change ResolvedConfig type to interface to allow extending it#19210patak-cat merged 3 commits intovitejs:mainfrom lazuee:main
patak-cat merged 3 commits intovitejs:mainfrom
lazuee:main
Conversation
hi-ogawa
reviewed
Jan 16, 2025
Contributor
hi-ogawa
left a comment
There was a problem hiding this comment.
Looking at your example #15473 (comment) where optional one is in UserConfig and strict one is in ResolvedConfig, I think this change makes sense.
The build failure is probably because dts bundling is too sensitive to some ordering. Can you try this diff?
Diff
diff --git a/packages/vite/rollup.dts.config.ts b/packages/vite/rollup.dts.config.ts
index 46306f0a2..f1ba14b3b 100644
--- a/packages/vite/rollup.dts.config.ts
+++ b/packages/vite/rollup.dts.config.ts
@@ -50,10 +50,10 @@ const identifierReplacements: Record<string, Record<string, string>> = {
Plugin$1: 'rollup.Plugin',
PluginContext$1: 'rollup.PluginContext',
TransformPluginContext$1: 'rollup.TransformPluginContext',
- TransformResult$2: 'rollup.TransformResult',
+ TransformResult$1: 'rollup.TransformResult',
},
esbuild: {
- TransformResult$1: 'esbuild_TransformResult',
+ TransformResult$2: 'esbuild_TransformResult',
TransformOptions$1: 'esbuild_TransformOptions',
BuildOptions$1: 'esbuild_BuildOptions',
},
hi-ogawa
previously approved these changes
Jan 16, 2025
patak-cat
previously approved these changes
Jan 16, 2025
Member
patak-cat
left a comment
There was a problem hiding this comment.
Sounds good, let's merge this one in 6.1
patak-cat
approved these changes
Jan 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR changes
ResolvedConfigfrom a type to an interface, allowing it to be extended for various use cases, including plugin development.Closes: #15473