Describe the bug
The vite @sveltejs/kit/vite sveltekit plugin is not compatible with vite workspace
Reproduction
https://github.com/josias-r/svelte-vitest-workspaces
Logs
npm test
> svelte-vitest-workspaces@1.0.0 test
> vitest
The following Vite config options will be overridden by SvelteKit:
- root
src/app.html does not exist
DEV v0.32.4 /Users/myuser/git/svelte-vitest-workspaces
include: **/__tests__/**/*.?(c|m)[jt]s?(x), **/?(*.){test,spec}.?(c|m)[jt]s?(x)
exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*
watch exclude: **/node_modules/**, **/dist/**
No test files found, exiting with code 1
System Info
System:
OS: macOS 14.1.1
CPU: (12) arm64 Apple M2 Pro
Memory: 95.47 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
bun: 1.0.9 - /opt/homebrew/bin/bun
Browsers:
Chrome: 120.0.6099.109
Safari: 17.1
Severity
annoyance
Additional Information
As it seems, the plugin breaks when it comes to the relative paths.
The include: ['src/**/*.{test,spec}.{js,ts}'] line should include all the unit tests, but for somereason it only detects them when it is set to include: ['my-app/src/**/*.{test,spec}.{js,ts}']
But that is also not a working workaround, as it causes other issues. Also not the warning src/app.html does not exist, which indicates that vitest is trying to run the tests not from the my-app folder, but (probably) the root folder
Describe the bug
The vite
@sveltejs/kit/vitesveltekitplugin is not compatible with vite workspaceReproduction
npm inpm testhttps://github.com/josias-r/svelte-vitest-workspaces
Logs
System Info
System: OS: macOS 14.1.1 CPU: (12) arm64 Apple M2 Pro Memory: 95.47 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm bun: 1.0.9 - /opt/homebrew/bin/bun Browsers: Chrome: 120.0.6099.109 Safari: 17.1Severity
annoyance
Additional Information
As it seems, the plugin breaks when it comes to the relative paths.
The
include: ['src/**/*.{test,spec}.{js,ts}']line should include all the unit tests, but for somereason it only detects them when it is set toinclude: ['my-app/src/**/*.{test,spec}.{js,ts}']But that is also not a working workaround, as it causes other issues. Also not the warning
src/app.html does not exist, which indicates that vitest is trying to run the tests not from themy-appfolder, but (probably) the root folder