excludes are not working
@sheremet-va đang làm issue này rồi.
Từ ngày 5/2/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 934
- Fork
- 123
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vitest-dev/vscode
-
Test run emits warning about 'api.vitest.experimental.ignoreFsModuleCache'Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởpending triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
vitest-dev/vscode#836 ·
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vitest-dev/vscode#776 · 1 reaction ·
-
p3-minor-bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
vitest-dev/vscode#823 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
vitest-dev/vscode#822 ·
-
enhancement: pending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
vitest-dev/vscode#821 ·
Tất cả issue của vitest-dev/vscode
Issue tương tự
-
[Bug]: Fix for unicode filenamesĐang mở🐛 bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
LibreChat-AI/LibreChat#17733 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
TypeStrong/typedoc#3150 ·
-
accessibility bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Normalize image-source MIME types before SVG dispatchCó thể đã có người làm @HarsH-1877 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
tscircuit/image-utils#58 · 1 bình luận ·
-
Add API: BlockVectra Data APIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày