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 @@ -19,6 +19,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
1919const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
2020const getClientEnvironment = require ( './env' ) ;
2121const paths = require ( './paths' ) ;
22+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
2223
2324// Webpack uses `publicPath` to determine where the app is being served from.
2425// In development, we always serve from the root. This makes config easier.
@@ -123,6 +124,7 @@ module.exports = {
123124 // please link the files into your node_modules/ and let module-resolution kick in.
124125 // Make sure your source files are compiled, as they will not be processed in any way.
125126 new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
127+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
126128 ] ,
127129 } ,
128130 module : {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2020const ForkTsCheckerWebpackPlugin = require ( 'fork-ts-checker-webpack-plugin' ) ;
2121const paths = require ( './paths' ) ;
2222const getClientEnvironment = require ( './env' ) ;
23+ const TsconfigPathsPlugin = require ( 'tsconfig-paths-webpack-plugin' ) ;
2324
2425// Webpack uses `publicPath` to determine where the app is being served from.
2526// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -129,6 +130,7 @@ module.exports = {
129130 // please link the files into your node_modules/ and let module-resolution kick in.
130131 // Make sure your source files are compiled, as they will not be processed in any way.
131132 new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
133+ new TsconfigPathsPlugin ( { configFile : paths . appTsConfig } )
132134 ] ,
133135 } ,
134136 module : {
Original file line number Diff line number Diff line change 4343 "sw-precache-webpack-plugin" : " 0.11.4" ,
4444 "ts-jest" : " ^20.0.7" ,
4545 "ts-loader" : " ^2.3.7" ,
46+ "tsconfig-paths-webpack-plugin" : " ^2.0.0" ,
4647 "tslint" : " ^5.7.0" ,
4748 "tslint-loader" : " ^3.5.3" ,
4849 "tslint-react" : " ^3.2.0" ,
You can’t perform that action at this time.
0 commit comments