Skip to content

Commit

Permalink
Change default tsconfig to use moduleResolution: Bundler (#26475)
Browse files Browse the repository at this point in the history
`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 (get-convex/convex#26542).

This doesn't affect `tsconfig.json`s in existing Convex projects and only affects new ones.

GitOrigin-RevId: 0821da39742bd17dcb59fd856496831ad4c4db67
  • Loading branch information
sshader authored and Convex, Inc. committed Jun 3, 2024
1 parent ac4c9c5 commit 99b18bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/codegen_templates/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ 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",
"lib": ["ES2021", "dom"],
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"module": "ESNext",
"moduleResolution": "Node",
"isolatedModules": true,
"skipLibCheck": true,
"noEmit": true,
Expand Down

0 comments on commit 99b18bd

Please sign in to comment.