diff --git a/src/core/build/types.ts b/src/core/build/types.ts index ad1eba814d..66e22aea7b 100644 --- a/src/core/build/types.ts +++ b/src/core/build/types.ts @@ -200,6 +200,7 @@ export async function writeTypes(nitro: Nitro) { moduleDetection: "force", isolatedModules: true, verbatimModuleSyntax: true, + allowImportingTsExtensions: true, /* Strictness */ strict: nitro.options.typescript.strict, noUncheckedIndexedAccess: true, diff --git a/src/core/config/defaults.ts b/src/core/config/defaults.ts index 9eb2c97b7b..cf35e6424e 100644 --- a/src/core/config/defaults.ts +++ b/src/core/config/defaults.ts @@ -85,7 +85,7 @@ export const NitroDefaults: NitroConfig = { // Advanced typescript: { - strict: false, + strict: true, generateTsConfig: true, generateRuntimeConfigTypes: true, tsconfigPath: "types/tsconfig.json",