mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
📦 chore: Update TypeScript Config for TS v7 (#12794)
- Enabled `esModuleInterop` in `client/tsconfig.json` for better module compatibility. - Changed `moduleResolution` from `node` to `bundler` in `client/tsconfig.json`. - Set `noEmit` to `true` in several `tsconfig.json` files to prevent output generation. - Removed `baseUrl` from various `tsconfig.json` files to simplify path resolution. - Updated path mappings in multiple packages to reflect new directory structures. These changes aim to streamline TypeScript configurations and improve module resolution across the project.
This commit is contained in:
parent
fc3189b718
commit
f7d59d3285
10 changed files with 14 additions and 25 deletions
|
|
@ -5,25 +5,22 @@
|
|||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": false,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": false,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noImplicitAny": false,
|
||||
"noEmit": false,
|
||||
"declaration": true,
|
||||
"declarationDir": "./types",
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
"baseUrl": "..",
|
||||
"paths": {
|
||||
"~/*": ["./client/src/*"],
|
||||
"test/*": ["./client/test/*"],
|
||||
"*": ["./client/*", "../node_modules/*"],
|
||||
"librechat-data-provider/*": ["./packages/data-provider/*"]
|
||||
"~/*": ["./src/*"],
|
||||
"test/*": ["./test/*"],
|
||||
"*": ["./*", "../../node_modules/*"],
|
||||
"librechat-data-provider/*": ["../packages/data-provider/*"]
|
||||
}
|
||||
},
|
||||
"types": ["node", "jest", "@testing-library/jest-dom"],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": ".",
|
||||
"outDir": "./dist",
|
||||
"strict": true,
|
||||
"moduleResolution": "node",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"outDir": "./dist/tests",
|
||||
"baseUrl": "."
|
||||
"outDir": "./dist/tests"
|
||||
},
|
||||
"include": ["specs/**/*", "src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
|
|
|||
|
|
@ -16,9 +16,8 @@
|
|||
"forceConsistentCasingInFileNames": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"~/*": ["./*"]
|
||||
"~/*": ["./src/*"]
|
||||
},
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"resolveJsonModule": true
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"librechat-data-provider/react-query": ["./src/react-query/index.ts"]
|
||||
"librechat-data-provider/react-query": ["./src/react-query/index.ts"],
|
||||
"src/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist", "types"],
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"outDir": "./dist/tests",
|
||||
"baseUrl": "."
|
||||
"outDir": "./dist/tests"
|
||||
},
|
||||
"include": ["specs/**/*", "src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
"noEmit": true,
|
||||
"target": "ES2020",
|
||||
"lib": ["ES2020"],
|
||||
"baseUrl": "../..",
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
"~/*": ["../../src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./**/*.ts"],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"outDir": "./dist/tests",
|
||||
"baseUrl": "."
|
||||
"outDir": "./dist/tests"
|
||||
},
|
||||
"include": ["specs/**/*", "src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue