Просмотр исходного кода

build(ts): switch to bundler module resolution to clear TS6 deprecations

TypeScript 6 emits deprecation warnings for the prior tsconfig:

- baseUrl is deprecated and will stop working in TS 7
- moduleResolution=node10 (the implicit default) is deprecated

Switches the project to moduleResolution: "bundler" (matches how rollup
actually resolves modules) and removes baseUrl. paths still works
without baseUrl in TS 4+ as long as the entries are relative, so the
@components/* mapping now uses ./src/html/components/* explicitly.

Both deprecation warnings cleared at js-compile time.
Aigars Silkalns 13 часов назад
Родитель
Сommit
54154bd1ab
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tsconfig.json

+ 2 - 2
tsconfig.json

@@ -8,15 +8,15 @@
     "noUnusedLocals": true,
     "noImplicitAny": true,
     "module": "esnext",
+    "moduleResolution": "bundler",
     "alwaysStrict": true,
     "strict": true,
     "strictNullChecks": true,
     "strictBindCallApply": true,
     "strictFunctionTypes": true,
     "strictPropertyInitialization": true,
-    "baseUrl": ".",
     "paths": {
-      "@components/*": ["src/html/components/*"],
+      "@components/*": ["./src/html/components/*"],
     },
     /* Language and Environment */
     "target": "es2022",