Skip to content

fix: skip parent tsconfig - #83

Merged
lukeed merged 3 commits into
mainfrom
fix/tsconfig-root
Oct 23, 2026
Merged

lukeed merged 3 commits into
mainfrom
fix/tsconfig-root

Conversation

@lukeed

@lukeed lukeed commented Oct 22, 2026

Copy link
Copy Markdown
Owner

A site in a folder inside another project failed to build. Rolldown found the parent project's tsconfig.json, which extended astro/tsconfigs/strict, and stopped with [TSCONFIG_ERROR] ... (bongo.config.ts), before bongo read the config.

Changes

  • loadModule() and the script bundler search for a tsconfig only when the project folder, which holds the config, has a tsconfig.json. A search from a file in the project then stops at that file at the latest. Without one, Rolldown uses no tsconfig.
  • data.load() takes the project root. Before, it passed the src folder, which differs from the project with --src. Errors in data modules now name files relative to the project, as for content data modules and partials.
  • Docs: a "Which tsconfig.json" section in typescript.md.

Not changed

  • tsconfig paths still do not apply in the config, data modules, or partials: the packages plugin of loadModule() marks ~/x as an external package first. That is how main works, and it is out of scope here.

Test plan

  • bun test (855 pass), bunx tsc -p ., bunx tsc -p build, bun run build
  • The new build() test fails on main with TSCONFIG_ERROR: a project under a folder with a broken tsconfig.json, with a config, a data module, a partial, a content data module, and a script
  • loadModule() and flush() still read the project's own tsconfig.json
  • By hand: the nested-lane setup from the report builds with the CLI

@lukeed
lukeed merged commit edc31a2 into main Oct 23, 2026
4 checks passed
@lukeed
lukeed deleted the fix/tsconfig-root branch October 23, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant