@@ -156,9 +156,9 @@ module.exports = function(webpackEnv) {
156
156
{
157
157
inject : true ,
158
158
template : appPage . appHtml ,
159
- // filename: `${appPage.name}.html`,
160
- // title: appPage.title,
161
- // chunks: [appPage.name]
159
+ filename : `${ appPage . name } .html` ,
160
+ title : appPage . title ,
161
+ chunks : [ appPage . name ] ,
162
162
} ,
163
163
isEnvProduction
164
164
? {
@@ -393,6 +393,30 @@ module.exports = function(webpackEnv) {
393
393
formatter : require . resolve ( 'react-dev-utils/eslintFormatter' ) ,
394
394
eslintPath : require . resolve ( 'eslint' ) ,
395
395
resolvePluginsRelativeTo : __dirname ,
396
+ // @remove -on-eject-begin
397
+ ignore : process . env . EXTEND_ESLINT === 'true' ,
398
+ baseConfig : ( ( ) => {
399
+ // We allow overriding the config only if the env variable is set
400
+ if ( process . env . EXTEND_ESLINT === 'true' ) {
401
+ const eslintCli = new eslint . CLIEngine ( ) ;
402
+ let eslintConfig ;
403
+ try {
404
+ eslintConfig = eslintCli . getConfigForFile (
405
+ paths . appIndexJs
406
+ ) ;
407
+ } catch ( e ) {
408
+ console . error ( e ) ;
409
+ process . exit ( 1 ) ;
410
+ }
411
+ return eslintConfig ;
412
+ } else {
413
+ return {
414
+ extends : [ require . resolve ( 'eslint-config-react-app' ) ] ,
415
+ } ;
416
+ }
417
+ } ) ( ) ,
418
+ useEslintrc : false ,
419
+ // @remove -on-eject-end
396
420
} ,
397
421
loader : require . resolve ( 'eslint-loader' ) ,
398
422
} ,
0 commit comments