Vite: a wildcard inside an import.meta.glob brace alternative is matched literally

Open
#273 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@FredApps is already working on this.

Since Nov 17, 2026.

  • #274 by @FredApps — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript, vite
Domain
devtools, testing

Research direction

Start with globPattern in src/repo/graph.ts and trace how brace alternatives in import.meta.glob patterns are converted for matching. Use the repro in src/registry.test.ts with src/icons/index.ts and src/icons/star-icon.ts; done means changing star-icon.ts selects the registry test instead of reporting no affected tests and fallbackRequired: false.

Written by the indexing model from the issue text.

Description

In src/repo/graph.ts, globPattern escapes each {...} alternative of an import.meta.glob pattern as literal text. ./icons/{index,*-icon}.ts matches index.ts only; the files loaded through *-icon have no edge. Changing one selects no tests and does not fall back.

Repro: src/registry.ts with import.meta.glob('./icons/{index,*-icon}.ts', { eager: true }), src/icons/index.ts, src/icons/star-icon.ts, and src/registry.test.ts importing the registry. Change src/icons/star-icon.ts.

Expected: src/registry.test.ts is selected.

Actual: no affected tests, fallbackRequired: false.

Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
18h 41m
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiffCI/core

All issues in DiffCI/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.