-
Notifications
You must be signed in to change notification settings - Fork 155
fix: look for required-server-files.json in outputPath #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: look for required-server-files.json in outputPath #424
Conversation
🦋 Changeset detectedLatest commit: 518d834 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch.
Since the appPath is not used anymore here, could you refactor the generateOutput
function ?
@conico974 done |
@@ -95,7 +95,7 @@ export async function build( | |||
await createRevalidationBundle(config); | |||
await createImageOptimizationBundle(config); | |||
await createWarmerBundle(config); | |||
await generateOutput(options.appPath, options.appBuildOutputPath, config); | |||
await generateOutput(options.appBuildOutputPath, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
As a side note for a new Issue ticket for potential build performance:
Can we wrap all the create...Bundle
functions on line 94-97 in a Promise.all
to run the bundling in parallel?
I believe they should all be independent and don't depend on each other.
I'm not sure if the time save would be noticeable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably not make a very big difference, the only 2 that takes a bit of time are the imageOptimization (because of sharp install) and the serverFunction themselves, but yeah that something that we could add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks LGTM!
@@ -95,7 +95,7 @@ export async function build( | |||
await createRevalidationBundle(config); | |||
await createImageOptimizationBundle(config); | |||
await createWarmerBundle(config); | |||
await generateOutput(options.appPath, options.appBuildOutputPath, config); | |||
await generateOutput(options.appBuildOutputPath, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably not make a very big difference, the only 2 that takes a bit of time are the imageOptimization (because of sharp install) and the serverFunction themselves, but yeah that something that we could add.
If build output path is different from the path to the root of the Next.js app's source code required-server-files.json is not found which throws a build error.