Skip to content

Commit 2dcde83

Browse files
committed
web: switch to "bundler" moduleResolution
To fix an issue with React Router v7 types > src/index.tsx:25:32 - error TS2307: Cannot find module 'react-router/dom' or its corresponding type declarations. > There are types at 'node_modules/react-router/dist/development/dom-export.d.mts', > but this result could not be resolved under your current 'moduleResolution' setting. > Consider updating to 'node16', 'nodenext', or 'bundler'. As per TypeScript documentation, https://www.typescriptlang.org/tsconfig/#moduleResolution > 'bundler' for use with bundlers. Like node16 and nodenext, this mode > supports package.json "imports" and "exports", but unlike the Node.js > resolution modes, bundler never requires file extensions on relative > paths in imports.
1 parent 916a4aa commit 2dcde83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"outDir": "dist/",
66
"isolatedModules": true,
77
"target": "esnext",
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"resolveJsonModule": true,
1010
"esModuleInterop": true,
1111
"allowJs": true,

0 commit comments

Comments
 (0)