|
1 | 1 | {
|
2 | 2 | "compilerOptions": {
|
3 |
| - "target": "ESNext", |
4 |
| - "module": "commonjs", |
5 |
| - "strict": true, |
6 |
| - "esModuleInterop": true, |
7 |
| - "skipLibCheck": true, |
8 |
| - "forceConsistentCasingInFileNames": true, |
9 |
| - "sourceMap": true, |
10 |
| - "outDir": "./dist", |
11 |
| - "rootDir": "./src", |
12 |
| - "baseUrl": "." |
| 3 | + "target": "ES2020", // Set to a modern ECMAScript version (or "ESNext" for the latest) |
| 4 | + "module": "CommonJS", // Set module system to CommonJS (for Node.js) |
| 5 | + "moduleResolution": "node", // Helps TypeScript find modules in Node.js |
| 6 | + "lib": [ |
| 7 | + "ES2020" |
| 8 | + ], // Include necessary libraries for Node.js runtime |
| 9 | + "esModuleInterop": true, // Allow default imports from modules that don't have a default export |
| 10 | + "skipLibCheck": true, // Skip type checking of declaration files (speeds up build) |
| 11 | + "strict": true, // Enable strict type checking |
| 12 | + "forceConsistentCasingInFileNames": true, // Enforce consistent file naming |
| 13 | + "outDir": "./dist", // Directory where compiled JavaScript will go |
| 14 | + "declaration": true, // Generate TypeScript declaration files (.d.ts) |
| 15 | + "declarationMap": true, // Generate map files for declarations |
| 16 | + "sourceMap": true, // Enable source maps for debugging |
| 17 | + "allowJs": false, // Do not allow JavaScript files in the project |
| 18 | + "resolveJsonModule": true, // Allow importing JSON modules (if needed) |
| 19 | + "noEmitOnError": true, // Don't emit any files if there are errors |
| 20 | + "types": [ |
| 21 | + "node", |
| 22 | + "vitest/globals" |
| 23 | + ] |
13 | 24 | },
|
14 |
| - "include": ["src/**/*.ts"], |
15 |
| - "exclude": ["node_modules", "dist"] |
| 25 | + "include": [ |
| 26 | + "src/**/*.ts", |
| 27 | + "test/**/*.ts" // Include all TypeScript files from the "src" folder |
| 28 | + ], |
| 29 | + "exclude": [ |
| 30 | + "node_modules", // Exclude node_modules folder |
| 31 | + "dist" // Exclude dist folder (output directory) |
| 32 | + ] |
16 | 33 | }
|
0 commit comments