From e32ed16a484fb6286934c614ca41e57e2b86963a Mon Sep 17 00:00:00 2001 From: kenzuya Date: Tue, 30 Sep 2025 17:39:26 +0700 Subject: [PATCH] build(config): update TypeScript module resolution and type roots Changed moduleResolution from 'node' to 'bundler' for modern bundler compatibility and expanded typeRoots to include Node.js types from node_modules/@types, improving type discovery and ensuring proper TypeScript compilation in the current environment. --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 698fca1..4bb2d66 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "CommonJS" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "moduleResolution": "node", + "moduleResolution": "bundler", "sourceMap": true /* Generates corresponding '.map' file. */, "outDir": "dist" /* Redirect output structure to the directory. */, "strict": true /* Enable all strict type-checking options. */, @@ -10,7 +10,7 @@ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - "typeRoots": ["./src/types"] + "typeRoots": ["./src/types", "./node_modules/@types"] }, "types": ["node"], "include": ["src"],