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 @@ -19,6 +19,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
19
19
const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
20
20
const getClientEnvironment = require ( './env' ) ;
21
21
const paths = require ( './paths' ) ;
22
+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
22
23
23
24
// Webpack uses `publicPath` to determine where the app is being served from.
24
25
// In development, we always serve from the root. This makes config easier.
@@ -123,6 +124,7 @@ module.exports = {
123
124
// please link the files into your node_modules/ and let module-resolution kick in.
124
125
// Make sure your source files are compiled, as they will not be processed in any way.
125
126
new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
127
+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
126
128
] ,
127
129
} ,
128
130
module : {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
20
20
const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
21
21
const paths = require ( './paths' ) ;
22
22
const getClientEnvironment = require ( './env' ) ;
23
+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
23
24
24
25
// Webpack uses `publicPath` to determine where the app is being served from.
25
26
// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -129,6 +130,7 @@ module.exports = {
129
130
// please link the files into your node_modules/ and let module-resolution kick in.
130
131
// Make sure your source files are compiled, as they will not be processed in any way.
131
132
new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
133
+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
132
134
] ,
133
135
} ,
134
136
module : {
Original file line number Diff line number Diff line change 43
43
"sw-precache-webpack-plugin" : " 0.11.4" ,
44
44
"ts-jest" : " ^20.0.7" ,
45
45
"ts-loader" : " ^2.3.7" ,
46
+ "tsconfig-paths-webpack-plugin" : " ^2.0.0" ,
46
47
"tslint" : " ^5.7.0" ,
47
48
"tslint-loader" : " ^3.5.3" ,
48
49
"tslint-react" : " ^3.2.0" ,
You can’t perform that action at this time.
0 commit comments