agama/web/tsconfig.json
David Díaz González 2dcde83900
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.
2025-11-10 16:57:50 +00:00

23 lines
681 B
JSON

{
"compilerOptions": {
"module": "ES2022",
"baseUrl": "./",
"outDir": "dist/",
"isolatedModules": true,
"target": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowJs": true,
"jsx": "react",
"allowSyntheticDefaultImports": true,
"types": ["node", "jest", "@testing-library/jest-dom", "webpack-env"],
"paths": {
"~/*": ["src/*"],
"~/client": ["src/client/index.js"],
"@icons/*": ["node_modules/@material-symbols/svg-400/outlined/*"],
"@bolderIcons/*": ["node_modules/@material-symbols/svg-700/outlined/*"]
}
},
"include": ["src", "custom.d.ts"]
}