Skip to content

fix(db): resolve extensions in tsconfig aliases - #881

Merged
atinux merged 1 commit into
nuxt-hub:mainfrom
onmax:fix/db-alias-extensions
Oct 19, 2026
Merged

atinux merged 1 commit into
nuxt-hub:mainfrom
onmax:fix/db-alias-extensions

Conversation

@onmax

@onmax onmax commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #880

Summary

getTsconfigAliases() reads .nuxt/tsconfig.json paths which strip file extensions. Alias resolves to e.g. .nuxt/better-auth/schema but file is schema.mjs. Rolldown fails.

Now tries common extensions (.mjs, .js, .ts, .mts, .json) when the extensionless path doesn't exist.

StackBlitz

Link Expected
Bug nuxthub-alias-extensions ❌ Build fails
Fix nuxthub-alias-extensions-fix ✅ Migration generated

CLI Reproduction

git clone --depth 1 --filter=blob:none --sparse --branch repro/nuxthub-alias-extensions https://github.com/onmax/repros.git
cd repros && git sparse-checkout set nuxthub-alias-extensions
cd nuxthub-alias-extensions && pnpm i && npx nuxt db generate

Verify fix

git sparse-checkout add nuxthub-alias-extensions-fix
cd ../nuxthub-alias-extensions-fix && pnpm i && npx nuxt db generate

@vercel

vercel Bot commented Mar 23, 2026

Copy link
Copy Markdown

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxthub/core@881

commit: e9ca36f

@onmax
onmax force-pushed the fix/db-alias-extensions branch 4 times, most recently from b5cc471 to e9ca36f Compare March 23, 2026 18:27
@onmax
onmax marked this pull request as ready for review March 23, 2026 18:28
@onmax
onmax force-pushed the fix/db-alias-extensions branch from e9ca36f to 162fa52 Compare June 30, 2026 05:26
@atinux
atinux force-pushed the fix/db-alias-extensions branch from 162fa52 to 9bac8d9 Compare October 19, 2026 20:23
@atinux
atinux merged commit 7c492a8 into nuxt-hub:main Oct 19, 2026
5 of 6 checks passed
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.

nuxt db generate fails to resolve .mjs aliases from tsconfig

2 participants