@@ -75,6 +75,13 @@ module.exports = function(webpackEnv) {
75
75
? workspacesMainFields
76
76
: undefined ;
77
77
78
+ const includePaths =
79
+ isEnvDevelopment && workspacesConfig . development
80
+ ? [ paths . appSrc , ...workspacesConfig . paths ]
81
+ : isEnvProduction && workspacesConfig . production
82
+ ? [ paths . appSrc , ...workspacesConfig . paths ]
83
+ : paths . appSrc ;
84
+
78
85
// Webpack uses `publicPath` to determine where the app is being served from.
79
86
// It requires a trailing slash, or the file assets will get an incorrect path.
80
87
// In development, we always serve from the root. This makes config easier.
@@ -347,11 +354,7 @@ module.exports = function(webpackEnv) {
347
354
loader : require . resolve ( 'eslint-loader' ) ,
348
355
} ,
349
356
] ,
350
- include : isEnvDevelopment && workspacesConfig . development
351
- ? [ paths . appSrc , workspacesConfig . paths ]
352
- : isEnvProduction && workspacesConfig . production
353
- ? [ paths . appSrc , workspacesConfig . paths ]
354
- : paths . appSrc ,
357
+ include : includePaths ,
355
358
} ,
356
359
{
357
360
// "oneOf" will traverse all following loaders until one will
@@ -373,12 +376,7 @@ module.exports = function(webpackEnv) {
373
376
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
374
377
{
375
378
test : / \. ( j s | m j s | j s x | t s | t s x ) $ / ,
376
- include :
377
- isEnvDevelopment && workspacesConfig . development
378
- ? [ paths . appSrc , workspacesConfig . paths ]
379
- : isEnvProduction && workspacesConfig . production
380
- ? [ paths . appSrc , workspacesConfig . paths ]
381
- : paths . appSrc ,
379
+ include : includePaths ,
382
380
loader : require . resolve ( 'babel-loader' ) ,
383
381
options : {
384
382
customize : require . resolve (
@@ -661,6 +659,10 @@ module.exports = function(webpackEnv) {
661
659
typescript : resolve . sync ( 'typescript' , {
662
660
basedir : paths . appNodeModules ,
663
661
} ) ,
662
+ compilerOptions : {
663
+ skipLibCheck : true ,
664
+ suppressOutputPathCheck : true ,
665
+ } ,
664
666
async : isEnvDevelopment ,
665
667
useTypescriptIncrementalApi : true ,
666
668
checkSyntacticErrors : true ,
@@ -672,7 +674,7 @@ module.exports = function(webpackEnv) {
672
674
'!**/src/setupProxy.*' ,
673
675
'!**/src/setupTests.*' ,
674
676
] ,
675
- watch : paths . appSrc ,
677
+ watch : includePaths ,
676
678
silent : true ,
677
679
// The formatter is invoked directly in WebpackDevServerUtils during development
678
680
formatter : isEnvProduction ? typescriptFormatter : undefined ,
0 commit comments