This repository was archived by the owner on Jan 26, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
Expand file tree Collapse file tree 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');
2121const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
2222const getClientEnvironment = require ( './env' ) ;
2323const paths = require ( './paths' ) ;
24+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
2425
2526// Webpack uses `publicPath` to determine where the app is being served from.
2627// In development, we always serve from the root. This makes config easier.
@@ -126,6 +127,7 @@ module.exports = {
126127 // please link the files into your node_modules/ and let module-resolution kick in.
127128 // Make sure your source files are compiled, as they will not be processed in any way.
128129 new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
130+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
129131 ] ,
130132 } ,
131133 module : {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2222const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
2323const paths = require ( './paths' ) ;
2424const getClientEnvironment = require ( './env' ) ;
25+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
2526
2627// Webpack uses `publicPath` to determine where the app is being served from.
2728// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -130,6 +131,7 @@ module.exports = {
130131 // please link the files into your node_modules/ and let module-resolution kick in.
131132 // Make sure your source files are compiled, as they will not be processed in any way.
132133 new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
134+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
133135 ] ,
134136 } ,
135137 module : {
Original file line number Diff line number Diff line change 4040 "style-loader" : " 0.18.2" ,
4141 "ts-jest" : " ^20.0.7" ,
4242 "ts-loader" : " ^2.3.7" ,
43+ "tsconfig-paths-webpack-plugin" : " ^2.0.0" ,
4344 "tslint" : " ^5.7.0" ,
4445 "tslint-loader" : " ^3.5.3" ,
4546 "tslint-react" : " ^3.2.0" ,
You can’t perform that action at this time.
0 commit comments