Skip to content

Commit

Permalink
build: Change "module": "node12" and "module": "moduleResolution"
Browse files Browse the repository at this point in the history
… of `tsconfig.json`
  • Loading branch information
mizdra committed Dec 28, 2021
1 parent 44a1054 commit 03e2117
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"incremental": true, // ビルド結果をキャッシュするように

/* Module Options */
// "module": "esnext", // 継承先で上書きする
"module": "node12",
"moduleResolution": "node12",
"esModuleInterop": true, // CommonJS モジュールを `import _ from 'commonjs'` で import できるように
"resolveJsonModule": true, // import した json の型を推論するように
"moduleResolution": "node", // `node` にしないと `resolveJsonModule` が使えない
"forceConsistentCasingInFileNames": true, // 大文字小文字を区別しない環境 (win) でも unix と同じように区別する

/* Additional Features */
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.src.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"outDir": "./dist/",
// Compatible for Node.js v12 (ref: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping)
"target": "ES2019",
"lib": ["ES2019"],
/* Module Options */
"module": "CommonJS"
"lib": ["ES2019"]
}
}
4 changes: 1 addition & 3 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// "rootDir": "./test",
// Compatible for Node.js v12 (ref: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping)
"target": "ES2019",
"lib": ["ES2019"],
/* Module Options */
"module": "CommonJS"
"lib": ["ES2019"]
}
}

0 comments on commit 03e2117

Please sign in to comment.