fix: static pages not rendered with fastify after v9.5#15469
fix: static pages not rendered with fastify after v9.5#15469fkatsuhiro wants to merge 2 commits intowithastro:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 7fbe2d5 The changes in this PR will be included in the next version bump. 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 |
commit: |
|
Can you add a test? The condition here doesn't seem to have anything to do with Fastify. What's the underlying problem? |
|
@matthewp Thank you for your reply. I had checked comments of #15467. The original reason for this implementation was a concern regarding the rendering process. Upon comparing the current server-app.ts with version 9.4.6, I noticed that new conditions for pre-rendering had been added. I suspected that But now I understood cause of this issue. and I noticed my mistake.... While node v9.5.0 ~ v10.00 -alpha, astro/packages/integrations/node/src/serve-app.ts Lines 52 to 63 in 241ffbd here But it has been improved already node v 10.0.0 - beta, maybe no problem... So, my PR no need to reflect for solving this issue.Should I close this PR? Or would you like me to create a test case for this specific issue instead? |
|
Close the PR if your issue is already fixed |
|
Okay. I'll close this PR. |
Changes
issue: #15467
cause:
With the upgrade to Node.js v9.5, a change was introduced in the conditional branching, causing statically built endpoints to be incorrectly routed to SSR processing, resulting in errors due to no executable page function being found.
change:
Changed the relevant conditional statement.
routeData && !(routeData.type === 'page' && routeData.prerender)↓
routeData && (routeData.type === 'redirect' || !routeData.prerender)Testing
Docs