Skip to content

Commit 7394b01

Browse files
Allow typescript to find or resolve module located on node_modules
1 parent a37b6b0 commit 7394b01

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

Diff for: templates/app/tsconfig(ts).json

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"target": "ES5",
1212
"skipLibCheck": true
1313
},
14+
"moduleResolution": "node",
15+
"typeRoots": [
16+
"node_modules/@types"
17+
],
1418
"exclude": [
1519
"node_modules"
1620
],

Diff for: templates/app/tsconfig.client.test(ts).json

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2-
"compilerOptions": {
3-
"sourceMap": true,
4-
"rootDir": "./client",
5-
"module": "commonjs",
6-
"outDir": ".tmp/test"
7-
},
8-
"filesGlob": [
9-
"client/{app,components}/**/*.{spec,mock}.ts",
10-
"client/test_typings/**/*.d.ts"
11-
]
2+
"compilerOptions": {
3+
"sourceMap": true,
4+
"rootDir": "./client",
5+
"module": "commonjs",
6+
"outDir": ".tmp/test"
7+
},
8+
"moduleResolution": "node",
9+
"typeRoots": [
10+
"node_modules/@types"
11+
],
12+
"filesGlob": [
13+
"client/{app,components}/**/*.{spec,mock}.ts",
14+
"client/test_typings/**/*.d.ts"
15+
]
1216
}

0 commit comments

Comments
 (0)