fix(db): resolve Nuxt aliases in schema bundling#802
Conversation
|
@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
|
I'm good with this, but the CLI commands might keep failing as |
mmm, should i try to reproduce this and mitigate issues or keep it like this and fix in the future? |
|
I guess for CLI we could maybe give at least the |
|
@atinux Added CLI support - generate and squash commands now read aliases from |
cli/commands/db/generate.mjs
Outdated
| import { join, resolve } from 'pathe' | ||
| import { buildDatabaseSchema } from '@nuxthub/core/db' | ||
|
|
||
| async function getTsconfigAliases(cwd) { |
There was a problem hiding this comment.
Is it better to getTsconfigAliases be inside utils/db.mjs instead of duplicate it?
Closes #800
Summary
Schema files bundled via tsdown didn't resolve Nuxt aliases (
#shared,~,@). Now passesnuxt.options.aliastobuildDatabaseSchema()so tsdown can resolve them.StackBlitz
CLI Reproduction
Verify fix
The
-fixedfolder uses pnpm patch to apply the fix locally.Related