Skip to content

Commit f3e0e91

Browse files
Fixing module resolution within IDEs (#592)
* Fixing tsconfigs to help IDEs resolve imports. Without these changes the IDE fails to find some imports and made it hard for things like intellisense and auto complete etc. It shouldn't make a difference with actual builds because the moduleResolution is overridden anyway. * Explicitly setting CJS projects to node10 moduleResolution. node10 is the default moduleResolution for cjs projects so this is just explicitly setting that so that the bundler entry from the base gets properly overwritten.
1 parent ff832af commit f3e0e91

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

Common/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist/cjs",
5-
"module": "commonjs"
5+
"module": "commonjs",
6+
"moduleResolution": "node10"
67
}
78
}

Common/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noImplicitReturns": true,
1313
"noPropertyAccessFromIndexSignature": true,
1414
"declaration": true,
15-
"declarationDir": "./dist/types"
15+
"declarationDir": "./dist/types",
16+
"moduleResolution": "bundler" // helps IDEs
1617
},
1718
"include": ["./src/*.ts"],
1819
"typedocOptions": {

Frontend/implementations/typescript/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist/cjs",
5-
"module": "commonjs"
5+
"module": "commonjs",
6+
"moduleResolution": "node10"
67
}
78
}

Frontend/implementations/typescript/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"noImplicitReturns": true,
1212
"noPropertyAccessFromIndexSignature": true,
1313
"declaration": true,
14-
"declarationDir": "./dist/types"
14+
"declarationDir": "./dist/types",
15+
"moduleResolution": "bundler" // helps IDEs
1516
},
1617
"lib": ["ES6"],
1718
"include": ["./src/*.ts"]

Frontend/library/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist/cjs",
5-
"module": "commonjs"
5+
"module": "commonjs",
6+
"moduleResolution": "node10"
67
}
78
}

Frontend/library/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noImplicitReturns": true,
1313
"noPropertyAccessFromIndexSignature": true,
1414
"declaration": true,
15-
"declarationDir": "./dist/types"
15+
"declarationDir": "./dist/types",
16+
"moduleResolution": "bundler" // helps IDEs
1617
},
1718
"lib": ["ES6"],
1819
"include": ["./src/**/*.ts"],

Frontend/ui-library/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist/cjs",
5-
"module": "commonjs"
5+
"module": "commonjs",
6+
"moduleResolution": "node10"
67
}
78
}

Frontend/ui-library/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noImplicitReturns": true,
1313
"noPropertyAccessFromIndexSignature": true,
1414
"declaration": true,
15-
"declarationDir": "./dist/types"
15+
"declarationDir": "./dist/types",
16+
"moduleResolution": "bundler"
1617
},
1718
"lib": ["es2015"],
1819
"include": ["./src/*.ts"],

Signalling/tsconfig.cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist/cjs",
5-
"module": "commonjs"
5+
"module": "commonjs",
6+
"moduleResolution": "node10"
67
}
78
}

Signalling/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noImplicitReturns": true,
1313
"noPropertyAccessFromIndexSignature": true,
1414
"declaration": true,
15-
"declarationDir": "./dist/types"
15+
"declarationDir": "./dist/types",
16+
"moduleResolution": "bundler" // helps IDEs
1617
},
1718
"include": ["./src/*.ts"],
1819
"typedocOptions": {

0 commit comments

Comments
 (0)