|
5 | 5 | "target": "ESNext", |
6 | 6 | "module": "ESNext", |
7 | 7 | // Enable node-style module resolution, for things like npm package imports. |
8 | | - "moduleResolution": "node", |
| 8 | + "moduleResolution": "Bundler", |
| 9 | + // Allow importing TypeScript files using their native extension (.ts(x)). |
| 10 | + "allowImportingTsExtensions": true, |
9 | 11 | // Enable JSON imports. |
10 | 12 | "resolveJsonModule": true, |
11 | | - // Enable stricter transpilation for better output. |
| 13 | + // Enforce the usage of type-only imports when needed, which helps avoiding bundling issues. |
| 14 | + "verbatimModuleSyntax": true, |
| 15 | + // Ensure that each file can be transpiled without relying on other imports. |
| 16 | + // This is redundant with the previous option, however it ensures that it's on even if someone disable `verbatimModuleSyntax` |
12 | 17 | "isolatedModules": true, |
13 | 18 | // Astro directly run TypeScript code, no transpilation needed. |
14 | 19 | "noEmit": true, |
15 | | - // Report an error when importing a file using a casing different from the casing on disk. |
| 20 | + // Report an error when importing a file using a casing different from another import of the same file. |
16 | 21 | "forceConsistentCasingInFileNames": true, |
17 | 22 | // Properly support importing CJS modules in ESM |
18 | 23 | "esModuleInterop": true, |
|
23 | 28 | "paths": { |
24 | 29 | "~/assets/*": ["src/assets/*"] |
25 | 30 | }, |
26 | | - // TypeScript 5.0 changed how `isolatedModules` and `importsNotUsedAsValues` works, deprecating the later |
27 | | - // Until the majority of users are on TypeScript 5.0, we'll have to supress those deprecation errors |
28 | | - "ignoreDeprecations": "5.0", |
29 | 31 | // Allow JavaScript files to be imported |
30 | 32 | "allowJs": true |
31 | 33 | } |
|
0 commit comments