Skip to content

Commit

Permalink
Add experimental compile/generate handling (#49491)
Browse files Browse the repository at this point in the history
This implements experimental`compile`/`generate` commands to allow
separate the compilation and static generation steps of the build.
Initially this is for testing and follows same experimental rules which
aren't covered by semver.

Note: most changes are just spacing changes so disabling that in the
diff will be helpful.

x-ref: [initial
thread](https://www.notion.so/vercel/bbdbba2016ed464eb5263d325fecc02f?pvs=4)
x-ref: [slack
thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1676591260523589?thread_ts=1676554904.334789&cid=C03DQ3QFV7C)
  • Loading branch information
ijjk committed May 10, 2023
1 parent ef2b8f8 commit e3e76a4
Show file tree
Hide file tree
Showing 4 changed files with 351 additions and 305 deletions.
5 changes: 5 additions & 0 deletions packages/next/src/bin/next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ if (!foundCommand && args['--help']) {
}

const command = foundCommand ? args._[0] : defaultCommand

if (['experimental-compile', 'experimental-generate'].includes(command)) {
args._.push('--build-mode', command)
}

const forwardedArgs = foundCommand ? args._.slice(1) : args._

if (args['--inspect'])
Expand Down

0 comments on commit e3e76a4

Please sign in to comment.