🔧(react) fix types file broken imports

Generated types for the react package were broken because they were
still using absolute imports which cannot work in standalone .d.ts
files because they cannot rely on the local baseUrl compiler option.
Thus, we introduced an alias that we are able to reliably replace
during type generation.
This commit is contained in:
Nathan Vasse
2023-05-04 15:04:47 +02:00
committed by NathanVss
parent 7eac0bfca1
commit d4a574c30f
25 changed files with 75 additions and 60 deletions

View File

@@ -2,7 +2,9 @@
"extends": "@openfun/typescript-configs/react.json",
"compilerOptions": {
"noEmit": true,
"baseUrl": "./src",
"paths": {
":/*": ["./src/*"]
},
"types": ["vitest/globals", "vite/client"]
},
"include": ["src", "cunningham.ts"],