I ran into some issues when using typecheck on my module.
Previously, my tsconfig.json looked like this
{
"extends": "./playground/.nuxt/tsconfig.json"
}
and everything worked using nuxi typecheck.
After I changed the extends path to ./.nuxt/tsconfig.json, just like when you create a new module with npx nuxi init -t module, the typechecks won't work anymore.
See this reproduction.
npm run typecheck1 doesn't work because the auto-imports from my module are missing and the @ alias in the playground can't be resolved.
npm run typecheck2 only fails because of the playground @ alias.
Yes, you need to run dev:prepare before checking types - using vue-tsc --noEmit is correct for a
The typecheck in root directory will correctly check your module but not the playground, so you should exclude it and run a second typecheck within your playground directory
Hi,
I ran into some issues when using typecheck on my module. Previously, my
tsconfig.json
looked like thisand everything worked using
nuxi typecheck
.After I changed the extends path to
./.nuxt/tsconfig.json
, just like when you create a new module withnpx nuxi init -t module
, the typechecks won't work anymore.See this reproduction.
npm run typecheck1
doesn't work because the auto-imports from my module are missing and the @ alias in the playground can't be resolved.npm run typecheck2
only fails because of the playground @ alias.Best regards David