Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit a445a40

Browse files
authored
Merge pull request #115 from nicolaserny/master
Update tsconfig to support dynamic import
2 parents 89cedc5 + 0880881 commit a445a40

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

packages/react-scripts/config/paths.js

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ module.exports = {
8282
testsSetup: resolveApp('src/setupTests.ts'),
8383
appNodeModules: resolveApp('node_modules'),
8484
appTsConfig: resolveApp('tsconfig.json'),
85+
appTsTestConfig: resolveApp('tsconfig.test.json'),
8586
publicUrl: getPublicUrl(resolveApp('package.json')),
8687
servedPath: getServedPath(resolveApp('package.json')),
8788
// These properties only exist before ejecting:
@@ -112,6 +113,7 @@ if (
112113
testsSetup: resolveOwn('template/src/setupTests.ts'),
113114
appNodeModules: resolveOwn('node_modules'),
114115
appTsConfig: resolveOwn('template/tsconfig.json'),
116+
appTsTestConfig: resolveOwn('template/tsconfig.test.json'),
115117
publicUrl: getPublicUrl(resolveOwn('package.json')),
116118
servedPath: getServedPath(resolveOwn('package.json')),
117119
// These properties only exist before ejecting:

packages/react-scripts/scripts/utils/createJestConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = (resolve, rootDir) => {
4747
},
4848
globals: {
4949
'ts-jest': {
50-
tsConfigFile: paths.appTsConfig,
50+
tsConfigFile: paths.appTsTestConfig,
5151
},
5252
},
5353
};

packages/react-scripts/template/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"outDir": "build/dist",
4-
"module": "commonjs",
4+
"module": "esnext",
55
"target": "es5",
66
"lib": ["es6", "dom"],
77
"sourceMap": true,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "commonjs"
5+
}
6+
}

0 commit comments

Comments
 (0)