skills/vendure-dashboard-migration/01b-tsconfig-setup.md
If not already set up, we need to make sure we have configured tsconfig with:
tsconfig.dashboard.json like this:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"jsx": "react-jsx"
},
"include": [
"src/dashboard/**/*.ts",
"src/dashboard/**/*.tsx"
]
}
{
// ...etc
"references": [
{
"path": "./tsconfig.dashboard.json"
},
]
}
"paths": {
// Import alias for the GraphQL types, this needs to point to
// the location specified in the vite.config.mts file as `gqlOutputPath`
// so will vary depending on project structure
"@/gql": ["./apps/server/src/gql/graphql.ts"],
// This line allows TypeScript to properly resolve internal
// Vendure Dashboard imports, which is necessary for
// type safety in your dashboard extensions.
// This path assumes a root-level tsconfig.json file.
// You may need to adjust it if your project structure is different.
"@/vdb/*": [
"./node_modules/@vendure/dashboard/src/lib/*"
}