Skip to content
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

Handle Next.js rewrites/redirects/headers #5212

Closed

Conversation

leoortizz
Copy link
Member

@leoortizz leoortizz commented Nov 4, 2022

Description

  • Handle Next.js rewrites/redirects/headers incompatible with firebase.json in Cloud Functions
  • Filter out Next.js prerendered routes that matches rewrites/redirects/headers rules from SSG content directory

Scenarios Tested

Sample Commands

src/frameworks/next/utils.ts Outdated Show resolved Hide resolved
src/frameworks/next/index.ts Outdated Show resolved Hide resolved
@jamesdaniels jamesdaniels marked this pull request as ready for review November 15, 2022 17:00
@jamesdaniels
Copy link
Member

jamesdaniels commented Nov 15, 2022

Marking as ready for review @leoortizz. If you could add a changelog and tests that would be great.

`replaceAll` is not supported by Node.js 14
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2022

Codecov Report

Base: 56.29% // Head: 56.24% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (9311974) compared to base (7b070b0).
Patch coverage: 33.82% of modified lines in pull request are covered.

❗ Current head 9311974 differs from pull request most recent head 6984b5f. Consider uploading reports for the commit 6984b5f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5212      +/-   ##
==========================================
- Coverage   56.29%   56.24%   -0.05%     
==========================================
  Files         309      311       +2     
  Lines       20828    20887      +59     
  Branches     4228     4246      +18     
==========================================
+ Hits        11725    11748      +23     
- Misses       8091     8126      +35     
- Partials     1012     1013       +1     
Impacted Files Coverage Δ
src/frameworks/next/index.ts 11.73% <2.32%> (-1.68%) ⬇️
src/frameworks/next/utils.ts 86.95% <86.95%> (ø)
src/frameworks/utils.ts 100.00% <100.00%> (ø)
src/emulator/functionsEmulator.ts 7.06% <0.00%> (-0.03%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@leoortizz leoortizz changed the title Filter out Next.js rewrites incompatible with firebase.json rewrites Filter out Next.js rewrites/redirects/headers incompatible with firebase.json Nov 16, 2022
src/frameworks/next/utils.ts Outdated Show resolved Hide resolved
src/frameworks/next/utils.ts Outdated Show resolved Hide resolved
src/frameworks/utils.ts Outdated Show resolved Hide resolved
@leoortizz leoortizz requested review from jamesdaniels and TheIronDev and removed request for jamesdaniels and TheIronDev December 5, 2022 22:05
Copy link
Member

@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.

Address nits if you have the chance & resolve merge conflict in the changelog (sorry that always happens). I'll kick off integration tests

jamesdaniels added a commit that referenced this pull request Dec 9, 2022
* Handle Next.js rewrites/redirects/headers incompatible with `firebase.json` in Cloud Functions
* Filter out Next.js prerendered routes that matches rewrites/redirects/headers rules from SSG content directory
@jamesdaniels
Copy link
Member

merged in #5316, thanks @leoortizz

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

Successfully merging this pull request may close these issues.

None yet

4 participants