-
Notifications
You must be signed in to change notification settings - Fork 126
Run Nx + Next.js builds from root context #180
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
Conversation
b621c32
to
e2d6639
Compare
let cmd = DEFAULT_COMMAND; | ||
if (process.env.MONOREPO_COMMAND) { | ||
cmd = process.env.MONOREPO_COMMAND; | ||
// Determine which command to run the build |
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.
Could you move this to line 31 right above where its first used?
|
||
// Parse args to pass to the build command | ||
let cmdArgs: string[] = []; | ||
if (process.env.MONOREPO_BUILD_ARGS) { |
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.
Where is MONOREPO build args set? I dont see it anywhere in the buildpacks code either
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.
MONOREPO_BUILD_ARGS is a new environment variable added in cl/631875763
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.
Maybe I'm missing something, but I can't seem to find MONOREPO_BUILD_ARGS in that cl. Could you help point me to it?
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.
Whoops sorry, just uploaded the changes - should be in line 95 of firebasenx/main.go
now
Companion PR to #177 for Nx + Next.js builds. One minor difference is that the
FIREBASE_APP_DIRECTORY
environment variable will still need to be specified, because the server.js file will be located atstandalone/<FIREBASE_APP_DIRECTORY>/server.js
in the .next standalone output directory and we need to specify that path in the bundle.yaml.