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 @@ -31,7 +31,10 @@ export async function build() {
3131}
3232
3333function checkRunningInsideNextjsApp ( ) {
34- if ( ! fs . existsSync ( path . join ( appPath , "next.config.js" ) ) ) {
34+ const extension = [ "js" , "cjs" , "mjs" ] . find ( ( ext ) =>
35+ fs . existsSync ( path . join ( appPath , `next.config.${ ext } ` ) )
36+ ) ;
37+ if ( ! extension ) {
3538 console . error ( "Error: next.config.js not found. Please make sure you are running this command inside a Next.js app." ) ;
3639 process . exit ( 1 ) ;
3740 }
@@ -63,6 +66,9 @@ function setStandaloneBuildMode() {
6366}
6467
6568function buildNextjsApp ( monorepoRoot : string ) {
69+ // note: always pass in "next.config.js" as the entrypoint.
70+ // @vercel /next only accepts "next.config.js" as the
71+ // entrypoint. But it doesn't actually use the file.
6672 return nextBuild ( {
6773 files : [ ] ,
6874 repoRootPath : monorepoRoot ,
You can’t perform that action at this time.
0 commit comments