docs(plan-2): fix vitest.config.ts to include @/ alias

Vitest doesn't read tsconfig paths automatically; the alias must be
declared in vitest.config.ts via resolve.alias. Discovered during
execution and fixed in the live blog package; updating the source
plan so future feature plans (auth, media, etc.) start correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-04 22:22:05 +02:00
parent c00283506c
commit 1da0c06085

View File

@@ -152,11 +152,21 @@ The domain `Article.content` field is also widened: the existing entity has `con
- [ ] **Step 4: Create vitest.config.ts**
```typescript
import path from "node:path";
import { baseVitestConfig } from "@repo/typescript-config/vitest.base";
export default baseVitestConfig;
export default {
...baseVitestConfig,
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
};
```
> Note: Vitest does NOT automatically read tsconfig `paths`. The `@/` alias used in `src/**/*.ts` source/test files must be declared explicitly in vitest.config.ts via `resolve.alias`. Same pattern repeats for every feature package's vitest.config.ts.
- [ ] **Step 5: Create empty index.ts**
```typescript