Skip to content

nuxt db generate fails to resolve .mjs aliases from tsconfig #880

@onmax

Description

@onmax

Description

nuxt db generate fails when schema files import from aliases pointing to .mjs templates.

getTsconfigAliases() reads .nuxt/tsconfig.json which strips extensions. Alias resolves to .nuxt/custom/tables but file is tables.mjs. Rolldown can't find it.

Originally reported in nuxt-modules/better-auth#292.

Reproduction

StackBlitz

git clone --depth 1 --filter=blob:none --sparse 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions