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
Next 13 fixes #5175
Next 13 fixes #5175
Conversation
Codecov ReportBase: 56.22% // Head: 56.15% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5175 +/- ##
==========================================
- Coverage 56.22% 56.15% -0.07%
==========================================
Files 308 308
Lines 20752 20776 +24
Branches 4206 4214 +8
==========================================
- Hits 11667 11666 -1
- Misses 8071 8096 +25
Partials 1014 1014
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. |
This comment was marked as resolved.
This comment was marked as resolved.
@TheIronDev added into the nextjs deploy test. FYI I'm porting the matrix/canary tests from FirebaseExtended to this repo, WIP here #5187 aiming to have that in good shape early next week. This would catch problems like this. |
// TODO drop from hosting if revalidate | ||
for (const route in prerenderManifest.routes) { | ||
if (prerenderManifest.routes[route]) { | ||
for (const path in prerenderManifest.routes) { |
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.
Should this not be of
?
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's not an iterable, it's an object: { "/foo": { ... }, "/bar": { ... }}
so in is correct, though with the linting rule (to ensure we don't iterate over private) it's a little verbose... perhaps const path of Object.keys(prerenderManifest)
or const [path, route] of Object.entries(prerenderManifest.routes)
would be stylistically preferable?
// / => index.json => index.html => index.html | ||
// /foo => foo.json => foo.html | ||
const parts = route | ||
const parts = path | ||
.split("/") | ||
.slice(1) | ||
.filter((it) => !!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.
The slice
and filter
bits seem redundant. It seems like you're using splice(1)
because leading slashes will lead to an empty element from split (are we guaranteed to lead with a slash?) and filter will filter out empty components as well. So if you're only and always going to have a leading slash, then splice does the trick. But filter seems like it works for that case and a final slash.
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.
I was likely overly defensive here, worrying aboth leading/trailing slash, I'll check my assumptions. that said, we're pushing cleanURLs to be true by default now when paired with hosting.source, I can probably simplify this code. I'll do that in a follow on so I unblock Next 13 from working
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.
Took on as a TODO to explore simplifying
when can we expect this to merge? |
When can we expect the next release with this fix? I tried building it myself a few days ago but had a weird bug where it kept |
i tried the 11.15.0 release, doesnt seem to work tho. Still giving me error that its looking for |
I tried the 11.15.0 release and hopefully it work 🔥👍 !
|
Version 11.15.0 is from two weeks ago and this has been merged 12 hours ago |
do u guys still use npm build && npm export? |
@JGSolutions ATM we call the Node entry point for Next Build API In an upcoming release, we're dropping the attempted |
@jamesdaniels Can you please look at this thread: #5369 ? We have been struggling with Firebase NextJS deployment issues and so far no one has answered from Firebase side. Given you are working on the development, hopefully you can help us out. Thanks a lot in advance. |
Couple of fixes for Next.js v13
TODO