Skip to content

Commit 710d4d5

Browse files
committed
Ensure we trap source code missing extension file in imports
1 parent a2c0d4a commit 710d4d5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tsconfig.build.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4+
"module": "nodenext", // Required to trap missing extension on import
45
"outDir": "./lib/",
56
"rootDir": "./src",
67
"tsBuildInfoFile": "./lib/tsconfig.build.tsbuildinfo",
8+
"moduleResolution": "nodenext" // Required to trap missing extension on import
79
},
810
"include": [
911
"./src/**/*.ts"

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"skipLibCheck": true,
1717
"strictPropertyInitialization": true,
1818
"strictNullChecks": true,
19-
"moduleResolution": "bundler",
19+
"moduleResolution": "bundler", // Can use bundler and omit file extension in test code.
2020
"allowSyntheticDefaultImports": true,
2121
"types": [
2222
"node",

0 commit comments

Comments
 (0)