-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
0 / 10 of 1 issue completedOpen
0 / 10 of 1 issue completed
Copy link
Labels
p3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Milestone
Description
Describe the bug
Currently, we need to create a server for every workspace project to resolve the config and have access to the module graph for project.vitenode/project.runner properties.
When the browser mode is enabled, we need a separate Vite server because it shouldn't share the same plugin that the project has and needs special additional handling. We also don't want to mix module graphs of different environments.
To fix this, we need to make some changes.
- refactor: deprecate
environmentMatchGlobsandpoolMatchGlobsin favor of workspace #6922 aso they can be removed in a major - Remove
poolMatchGlob- this makes it possible to run Node.js tests and browser tests in the same project (which is the main reason why we need separate servers). Recommend theworkspaceinstead - Remove
environmentMatchGlob- the presence of this requires us to share the module graph between different environments. Recommend theworkspaceinstead - Allow inline workspace #6913 to make the migration easier
This would guarantee that a single project is responsible for a single environment. With Vite 6, we can even migrate it to inline Vite environments.
Possible problems:
--projectfilter is applied after all projects are resolved. Ideally, we should have a separation between config resolution and server creation, but Vite currently doesn't allow it (environment API allows it though)--projectfilter can be changed dynamically in watch mode. To support this, we would have to keep the configs around, but also close the filtered projects, - a lot of moving parts there. I am not sure it's justifyable to keep this feature.- How does inline workspace look like? What if there is a workspace file? Does it override it?
Reproduction
https://github.com/vitest-dev/vitest/tree/main/examples/lit
System Info
AnyUsed Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
p3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Type
Projects
Status
Approved
