diff --git a/src/core/build/types.ts b/src/core/build/types.ts index ee4cb19969..ad1eba814d 100644 --- a/src/core/build/types.ts +++ b/src/core/build/types.ts @@ -190,19 +190,24 @@ export async function writeTypes(nitro: Nitro) { const tsconfigDir = dirname(tsConfigPath); const tsConfig: TSConfig = defu(nitro.options.typescript.tsConfig, { compilerOptions: { - forceConsistentCasingInFileNames: true, - strict: nitro.options.typescript.strict, - noEmit: true, + /* Base options: */ + esModuleInterop: true, + allowSyntheticDefaultImports: true, + skipLibCheck: true, target: "ESNext", - module: "ESNext", - moduleResolution: - nitro.options.experimental.typescriptBundlerResolution === false - ? "Node" - : "Bundler", allowJs: true, resolveJsonModule: true, + moduleDetection: "force", + isolatedModules: true, + verbatimModuleSyntax: true, + /* Strictness */ + strict: nitro.options.typescript.strict, + noUncheckedIndexedAccess: true, + noImplicitOverride: true, + forceConsistentCasingInFileNames: true, + /* If NOT transpiling with TypeScript: */ + module: "Preserve", jsx: "preserve", - allowSyntheticDefaultImports: true, jsxFactory: "h", jsxFragmentFactory: "Fragment", paths: {