File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1606,18 +1606,24 @@ export class MigrateController
16061606 this . spinner . succeed ( `Initialized new ${ "webpack.config.js" . yellow } ` ) ;
16071607
16081608 const packageJSON = this . $fs . readJson ( projectData . projectFilePath ) ;
1609- const currentMain = packageJSON . main ;
1609+ const currentMain = packageJSON . main ?? "app.js" ;
16101610 const currentMainTS = currentMain . replace ( / .j s $ / , ".ts" ) ;
16111611
16121612 const appPath = projectData . appDirectoryPath ;
16131613
16141614 const possibleMains = [
16151615 `./${ appPath } /${ currentMain } ` ,
16161616 `./${ appPath } /${ currentMainTS } ` ,
1617+ `./${ appPath } /main.js` ,
1618+ `./${ appPath } /main.ts` ,
16171619 `./app/${ currentMain } ` ,
16181620 `./app/${ currentMainTS } ` ,
16191621 `./src/${ currentMain } ` ,
16201622 `./src/${ currentMainTS } ` ,
1623+ `./app/main.js` ,
1624+ `./app/main.ts` ,
1625+ `./src/main.js` ,
1626+ `./src/main.ts` ,
16211627 ] ;
16221628 const replacedMain = possibleMains . find ( ( possibleMain ) => {
16231629 return this . $fs . exists ( path . resolve ( projectDir , possibleMain ) ) ;
You can’t perform that action at this time.
0 commit comments