Merged
Conversation
|
|
9 tasks
sapphi-red
reviewed
Jul 7, 2023
Member
sapphi-red
left a comment
There was a problem hiding this comment.
I like the new convention 👍
bluwy
reviewed
Jul 7, 2023
bluwy
approved these changes
Jul 7, 2023
sapphi-red
approved these changes
Jul 7, 2023
4 tasks
sapphi-red
added a commit
to xinxinhe1810/vite
that referenced
this pull request
Jul 25, 2023
The config will be loaded automatically as vitejs#13725 is merged
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
Our current test setup for config variants loaded the config files from the original
playgroundfolder instead of theplayground-tempcopy. This caused issues when using__dirnameto resolve paths. I'm surprised that the tests were working. This is the issue discovered in #13712 in this comment.It worked by looking for a
vite.config.*file in the folder of the playground variant spec.But the files inside
__tests__are not copied toplayground-temp.Most of these config files were a re-export of the config defined at root.
This PR defines a new convention. For variants, if there is a config named
vite.config-{variantName}.jsin root, it is then used (these are copied already toplayground-temp). We were already using this convention to be able to run the playgrounds outside of Vitest. So we just needed to delete all thevite.config.jsfiles inside__tests__(the only ones that were different were for worker sourcemap, but I reworked them... it is better because we can now run them out of tests too).What is the purpose of this pull request?