Repository navigation
Description
What happened?
quasar build aborts on a fresh checkout with one error per .vue file (2 in the
minimal repro, 39 in the monorepo where it was found):
[plugin vite:vue] .../app-a/src/App.vue
Error: Transform failed with 1 error:
[TSCONFIG_ERROR] Failed to load tsconfig '../app-b/.quasar/tsconfig.json': Tsconfig not found
The path points at the generated tsconfig of a sibling workspace project. The build only
fails when that sibling has never been prepared (fresh clone, or an install with
npm ci --ignore-scripts / bun ci --ignore-scripts, which skips postinstall: quasar prepare).
When the sibling .quasar does exist the build passes, but .vue script blocks are
transformed with the sibling's tsconfig, silently: in the original monorepo,
apps/admin/src/*.vue resolved to apps/web/tsconfig.json, so target,
experimentalDecorators, jsx, verbatimModuleSyntax, useDefineForClassFields came from
the wrong project.
What did you expect to happen?
.vue files are owned by their own app project, and quasar build succeeds on a fresh
checkout regardless of whether another workspace project has been prepared. Concretely: a
.vue file must match the app tsconfig and never trigger resolution of
<workspaceRoot>/tsconfig.json references.
Reproduction URL
https://github.com/Zeph33/quasar-tsconfig-vue-repro
How to reproduce?
Command
git clone https://github.com/Zeph33/quasar-tsconfig-vue-repro
cd quasar-tsconfig-vue-repro
npm install
npm run buildRequires Node ^22.22.0 (Vite 8 / rolldown need ^20.19.0 || >=22.12.0, @quasar/app-vite@3
declares ^22.22.0).
Layout
app-a is the Quasar app being built; app-a's postinstall runs quasar prepare, so
app-a/.quasar exists. app-b contains nothing but a tsconfig.json
({"extends": "./.quasar/tsconfig.json"}) and no .quasar directory: it stands for the
second Quasar app of a workspace that has not been prepared. The root tsconfig.json is a
solution-style config referencing both.
Both conditions are required, and both are normal on CI:
- a root solution
tsconfig.jsonwithreferences(without it the lookup ends with "no
tsconfig" instead of an error), app-b/.quasarabsent.
Verify the suggested fix
git switch fix
npm install
npm run build # succeeds
### Command
npm run build
### App modes
SPA
### Quasar info output
```Shell
Operating System - Linux(7.2.9-1-MANJARO) - linux/x64
Node.js - 24.21.0
Global packages
NPM - 12.2.0
yarn - 1.22.22
pnpm - 11.28.4
bun - 1.4.4
@quasar/cli - undefined
@quasar/icongenie - 7.0.0
cordova - Not installed
Important local packages
quasar - 2.35.2
@quasar/app-vite - 3.10.3
@quasar/extras - 2.1.0
vue - 3.5.44
vue-router - 5.4.0
pinia - 4.1.0
typescript - 6.0.3-bridge.16 (tsgo-backed fork)
vite - 8.3.5
rolldown - 1.2.11
Quasar App Extensions
*None installed*
`@vitejs/plugin-vue` 6.0.10 is installed as a direct devDependency. Note: the failing
transform actually runs on rolldown **1.2.16** (see the stack trace below), while
`quasar info` resolves 1.2.11 from the workspace dependency graph. All packages above are
the latest published versions at the time of writing.Relevant log output
Build mode............. SPA
Pkg quasar............. v2.35.2
Pkg @quasar/app-vite... v3.10.3
Pkg vite............... v8.3.5
App • WAIT • Vite • Compiling SPA UI...
✗ Build failed in 1.06s
Build failed with 2 errors:
[plugin vite:vue] .../app-a/src/App.vue
Error: Transform failed with 1 error:
[TSCONFIG_ERROR] Failed to load tsconfig '../app-b/.quasar/tsconfig.json': Tsconfig not found
at transformWithOxc (.../vite/dist/node/chunks/node.js:7618:19)
at transformMain (.../@vitejs/plugin-vue/dist/index.mjs:1435:32)
at async plugin (.../rolldown/dist/shared/bindingify-input-options-CM8bmcLg.mjs:1758:16)
at async QuasarModeBuilder.buildWithVite (.../@quasar/app-vite/lib/app-tool.js:24:5)
at async QuasarModeBuilder.build (.../@quasar/app-vite/lib/modes/spa/spa-builder.js:9:5)
App • ⚠️ FAIL App build failed (check the log above)Additional context
Root cause
lib/types-generator.js generates .quasar/tsconfig.json with:
"include": ["./*.d.ts", "./../**/*"]Rolldown matches a file against a project through files/include/exclude, and per
rolldown's own documentation (packages/rolldown/src/options/docs/tsconfig.md):
Whether an
includeglob matches a file depends on its extension: by default only
TypeScript files (.ts/.tsx/.mts/.cts) match, plus.js/.jsx/.mjs/.cjswhen
allowJsis enabled. A glob that names an explicit extension (for example
src/**/*.vue) matches that extension verbatim.
./../**/* covers every TS/JS file but never .vue. No project owns the .vue file, so
discovery leaves the app, reaches the root solution tsconfig.json, resolves its
references in order, and tries to load a referenced project's tsconfig.json whose
extends target (.quasar/tsconfig.json) has not been generated. That load failure is fatal
and aborts the build.
Relevant call site in @vitejs/plugin-vue 6.0.10:
transformWithOxc(resolvedCode, filename, { ...options.devServer?.config.oxc, lang: 'ts', sourcemap }, resolvedMap)No fifth (config) argument during build, since options.devServer is undefined outside dev,
so Vite calls getTSConfigResolutionCache(undefined) and falls back to per-file
auto-discovery. Consequence: tsconfig / oxc.tsconfig set in the Vite config cannot fix
.vue files during a build. The generated include is the only lever.
Measurements
Probe: rolldown's resolveTsconfig (rolldown/dist/shared/resolve-tsconfig-*.mjs), fresh
TsconfigCache per run, input apps/admin/src/App.vue of the monorepo, with the standard
Quasar layout ({"extends": "./.quasar/tsconfig.json"}, so the generated include is
inherited). Deterministic across runs.
.quasar/tsconfig.json → include |
resolved project |
|---|---|
["./*.d.ts", "./../**/*"] (generated today) |
apps/web/tsconfig.json |
["./*.d.ts", "./../**/*", "./../**/*.vue"] |
apps/admin/tsconfig.json |
["./*.d.ts", "./../**/*.{ts,vue}"] |
apps/admin/tsconfig.json |
["./*.d.ts", "./../**/*.*"] |
apps/web/tsconfig.json |
["./*.d.ts", "./../**/App.vue"] |
apps/admin/tsconfig.json |
["./*.d.ts", "./../src/**/*.vue"] |
apps/web/tsconfig.json |
["./*.d.ts", "./../src/App.vue"] |
apps/web/tsconfig.json |
With the same patterns written directly in apps/admin/tsconfig.json (no .. segment):
["./src/**/*.vue"] and ["./src/App.vue"] resolve to apps/admin/tsconfig.json, while
["./src/**/*"] falls back to apps/web/tsconfig.json.
So the pattern has to be the ./../**/*-shaped one. ./../src/**/*.vue and even
./../src/App.vue are silently ignored (a leading .. is only absorbed by **), although
they are the correct spellings relative to .quasar.
Suggested fix
- include: ['./*.d.ts', './../**/*'],
+ include: ['./*.d.ts', './../**/*', './../**/*.vue'],- Additive for
tsc/vue-tsc:.vuefiles were already covered by./../**/*, so
type-checking scope does not change. - Same thing
packages/ui/tsconfig.jsondoes by hand ("include": [..., "./src/**/*.vue"]). - Verified on the linked repro:
mainfails,fixbuilds, from a clean state
(rm -rf app-a/.quasar app-a/dist).
The related rolldown defects (separate report): a file owned by no project is attributed to
an arbitrary sibling project instead of "discovery continues upward" as documented, and a
missing extends target in a referenced project aborts the whole build. rolldown#11264
covers the same blind spot, but only as a TsconfigCache performance regression.
Workaround (app side, no node_modules patching)
// quasar.config.ts > build
typescript: {
strict: true,
vueShim: true,
extendTsConfig(tsConfig) {
tsConfig.include?.push('./../**/*.vue')
},
}Generated with AI assistance: the analysis, measurements and draft of this report were
produced by deepseek-v4.1-flash (Zed agent) on the reporter's machine, running the
commands and probes quoted above. Reviewed by a human before submission.
Activity
fix(app-vite): include .vue files in the generated tsconfig #18589 (#…