This repository was archived by the owner on Jan 26, 2019. It is now read-only.
File tree 3 files changed +5
-0
lines changed
3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
21
21
const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
22
22
const getClientEnvironment = require ( './env' ) ;
23
23
const paths = require ( './paths' ) ;
24
+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
24
25
25
26
// Webpack uses `publicPath` to determine where the app is being served from.
26
27
// In development, we always serve from the root. This makes config easier.
@@ -126,6 +127,7 @@ module.exports = {
126
127
// please link the files into your node_modules/ and let module-resolution kick in.
127
128
// Make sure your source files are compiled, as they will not be processed in any way.
128
129
new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
130
+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
129
131
] ,
130
132
} ,
131
133
module : {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
22
22
const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
23
23
const paths = require ( './paths' ) ;
24
24
const getClientEnvironment = require ( './env' ) ;
25
+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
25
26
26
27
// Webpack uses `publicPath` to determine where the app is being served from.
27
28
// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -130,6 +131,7 @@ module.exports = {
130
131
// please link the files into your node_modules/ and let module-resolution kick in.
131
132
// Make sure your source files are compiled, as they will not be processed in any way.
132
133
new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
134
+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
133
135
] ,
134
136
} ,
135
137
module : {
Original file line number Diff line number Diff line change 40
40
"style-loader" : " 0.18.2" ,
41
41
"ts-jest" : " ^20.0.7" ,
42
42
"ts-loader" : " ^2.3.7" ,
43
+ "tsconfig-paths-webpack-plugin" : " ^2.0.0" ,
43
44
"tslint" : " ^5.7.0" ,
44
45
"tslint-loader" : " ^3.5.3" ,
45
46
"tslint-react" : " ^3.2.0" ,
You can’t perform that action at this time.
0 commit comments