Skip to content

Set App Hosting overrides for NextJS apps without a Next Config #323

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mathu97
Copy link
Collaborator

@mathu97 mathu97 commented Apr 1, 2025

Currently we're skipping adding FAH overrides for Next projects that don't have a Next Config file.

@mathu97 mathu97 marked this pull request as ready for review April 1, 2025 20:41
Copy link
Collaborator

@annajowang annajowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with some comments

if (!userNextConfigExists) {
console.log(`No Next config file found, creating one with Firebase App Hosting overrides`);
try {
await writeFile(join(projectRoot, DEFAULT_NEXT_CONFIG_FILE), defaultNextConfigForFAH());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does nextConfigFileName include the default filename? Then we can drop nextConfigFileName in favor.

Copy link
Collaborator

@jamesdaniels jamesdaniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve, nit in comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants