From 99b18bd03de93aadc4e6274662c419e3adf5d211 Mon Sep 17 00:00:00 2001 From: Sarah Shader Date: Mon, 3 Jun 2024 18:21:42 -0400 Subject: [PATCH] Change default tsconfig to use moduleResolution: Bundler (#26475) `moduleResolution: Bundler` was released in TS 5.0 and seems to work better with some common npm packages (like Vite), so let's change our default while also recommending TS 5.0 (https://github.com/get-convex/convex/pull/26542). This doesn't affect `tsconfig.json`s in existing Convex projects and only affects new ones. GitOrigin-RevId: 0821da39742bd17dcb59fd856496831ad4c4db67 --- src/cli/codegen_templates/tsconfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/codegen_templates/tsconfig.ts b/src/cli/codegen_templates/tsconfig.ts index 381bab9..6e4751f 100644 --- a/src/cli/codegen_templates/tsconfig.ts +++ b/src/cli/codegen_templates/tsconfig.ts @@ -8,6 +8,7 @@ export function tsconfigCodegen() { /* These settings are not required by Convex and can be modified. */ "allowJs": true, "strict": true, + "moduleResolution": "Bundler", /* These compiler options are required by Convex */ "target": "ESNext", @@ -15,7 +16,6 @@ export function tsconfigCodegen() { "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true, "module": "ESNext", - "moduleResolution": "Node", "isolatedModules": true, "skipLibCheck": true, "noEmit": true,