excludes are not working
Maintainers usually reply within 1 day
@sheremet-va is already working on this.
Since Feb 5, 2026.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
In the https://github.com/QwikDev/qwik monorepo, I configured vitest as follows:
import { qwikVite } from '@qwik.dev/core/optimizer';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [
qwikVite({
debug: !true,
srcDir: `./packages/qwik/src`,
}),
tsconfigPaths({ ignoreConfigErrors: true }),
],
test: {
root: 'packages',
include: [
'**/*.spec.?(c|m)[jt]s?(x)',
'**/*.unit.?(c|m)[jt]s?(x)',
'!*/(lib|dist|build|server|target)/**',
'!**/node_modules/**',
],
setupFiles: ['../vitest-setup.ts'],
projects: ['..'],
},
});
and when I test this by adding a unit test file under an excluded path (like packages/docs/server/testing.unit.ts), and running vitest list --files-only, then it works, the excluded file isn't shown.
However, when I look at the vitest extension output, and I touch a file under an excluded path, it will output that the file was changed, not that it was ignored.
This is a problem when some build steps are creating thousands of files and the vitest extension seems to scan and process all of them, even when watch mode is off and no tests are running.
Reproduction
have the extension in vscode
- clone https://github.com/QwikDev/qwik on the branch build/v2,
pnpm iand open it in vscode pnpm build.localpnpm docs.preview
at the end of the build it will be writing to packages/docs/server which is excluded, but the vitest extension will start to process all of it and use lots of resources.
Please note, this is not a minimial repro because it would take some time to do and I am thinking that perhaps you can already know where the problem is without the repro. If the minimal repro is still needed I will make it.
Output
there is no error besides out of memory and things like changed file: packages/docs/server/...
Here is what happens when I touch packages/docs/server/testing.unit.ts:
INFO 11:10:08 AM] [API] Resolving configs: qwik/vitest.config.mts, qwik-react/vite.config.mts, qwik-cli-e2e/vite.config.mts, adapters-e2e/vite.config.ts, qwik-react-e2e/vite.config.ts, insights/vitest.config.mts, docs/vite.config-repl-sw.ts, docs/vite.config.ts, supabase-auth-helpers-qwik/vite.config.mts, qwik-router/vite.config.mts, csr/vite.config.mts, perf.prod/vite.config.mts, preloader-test/vite.config.ts, library/vite.config.mts, base/vite.config.mts, express/vite.config.ts, express/vite.config.ts, netlify-edge/vite.config.ts, cloudflare-pages/vite.config.ts, web-worker/vite.config.mts, supabase-auth-helpers-qwik/vite.config.d.mts, qwik-router/vite.config.d.mts, qwik-router/vite.config.mjs, supabase-auth-helpers-qwik/vite.config.mjs, deno/vite.config.mts, vercel-edge/vite.config.mts, ssg/vite.config.mts, bun/vite.config.mts, express/vite.config.mts, cloud-run/vite.config.mts, node-server/vite.config.mts, cloudflare-pages/vite.config.mts, azure-swa/vite.config.mts, firebase/vite.config.mts, fastify/vite.config.mts, aws-lambda/vite.config.mts, netlify-edge/vite.config.mts, library/vite.config.mts, base/vite.config.mts, csr/vite.config.mts, web-worker/vite.config.d.mts, web-worker/vite.config.mjs, bun/vite.config.mts, cloudflare-pages/vite.config.mts, ssg/vite.config.mts, azure-swa/vite.config.mts, vercel-edge/vite.config.mts, firebase/vite.config.mts, aws-lambda/vite.config.mts, deno/vite.config.mts, node-server/vite.config.mts, cloud-run/vite.config.mts, express/vite.config.mts, netlify-edge/vite.config.mts, fastify/vite.config.mts
[INFO 11:10:08 AM] [API] Running Vitest v3.2.4 (qwik/vitest.config.mts) with "/nix/store/cwxxy2is6hb4dcqsx8rhnvwic3hfzpcd-nodejs-22.19.0/bin/node /home/wmertens/.vscode/extensions/vitest.explorer-1.32.0/dist/worker.js"
[INFO 11:10:09 AM] [API] Ignoring config qwik-react/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config qwik-cli-e2e/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config adapters-e2e/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config qwik-react-e2e/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config insights/vitest.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config docs/vite.config-repl-sw.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config docs/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config supabase-auth-helpers-qwik/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config qwik-router/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config csr/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config perf.prod/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config preloader-test/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config library/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config base/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config express/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config express/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config netlify-edge/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config cloudflare-pages/vite.config.ts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config web-worker/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config supabase-auth-helpers-qwik/vite.config.d.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config qwik-router/vite.config.d.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config qwik-router/vite.config.mjs because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config supabase-auth-helpers-qwik/vite.config.mjs because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config deno/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config vercel-edge/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config ssg/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config bun/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config express/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config cloud-run/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config node-server/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config cloudflare-pages/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config azure-swa/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config firebase/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config fastify/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config aws-lambda/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config netlify-edge/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config library/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config base/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config csr/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config web-worker/vite.config.d.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config web-worker/vite.config.mjs because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config bun/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config cloudflare-pages/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config ssg/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config azure-swa/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config vercel-edge/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config firebase/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config aws-lambda/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config deno/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config node-server/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config cloud-run/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config express/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config netlify-edge/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Ignoring config fastify/vite.config.mts because there is a workspace config in the parent folder
[INFO 11:10:09 AM] [API] Watching vitest.config.mts
[INFO 11:10:09 AM] [VSCODE] Watching qwik with pattern **/*
[11:12:19 AM] [VSCODE] File created: packages/docs/server/testing.unit.ts
[INFO 11:12:19 AM] [Worker] Collecting tests due to file changes: docs/server/testing.unit.ts
Collecting using AST explorer...
[INFO 11:12:19 AM] [Worker] Collecting docs/server/testing.unit.ts
[Error 11:12:19 AM] Cannot find a file test item for /home/wmertens/Projects/qwik/packages/docs/server/testing.unit.ts in "core" project.
Extension Version
1.32.0
Vitest Version
3.2.4
Validations
- Check that you are using the latest version of the extension
- 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.
- Dominant language
- TypeScript
- Stars
- 930
- Forks
- 124
- Avg merge
- 16h 20m
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vitest-dev/vscode
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vitest-dev/vscode#776 · 1 reaction ·
Maintainers usually reply within 1 day
-
p3-minor-bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
vitest-dev/vscode#823 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
vitest-dev/vscode#822 ·
Maintainers usually reply within 1 day
-
enhancement: pending triage
Difficulty 3/5 1-2 days Newbie friendliness 68/100
vitest-dev/vscode#821 ·
Maintainers usually reply within 1 day
-
pending triage
Difficulty 3/5 1-2 days Newbie friendliness 70/100
vitest-dev/vscode#812 ·
Maintainers usually reply within 1 day
All issues in vitest-dev/vscode
Similar issues
-
check:passed streams:add
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
beta technical-medium ui
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
walletbeat/walletbeat#1625 ·
Maintainers usually reply within 1 day
-
[Good First Issue]: Add unit tests for NetworkVersionInfoPossibly taken A pull request linked to this issue is open or already merged. OpenGood First Issue hacktoberfest
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
hiero-ledger/hiero-sdk-js#4489 ·
Maintainers usually reply within 1 day
-
[Bug] The clients language filter cannot select the rows the page labels as unknownPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/rocketmq-dashboard#6103 ·
Maintainers usually reply within 4 days
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#18652 ·
Maintainers usually reply within 1 day