Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(nuxt): don't force prerender / if user doesn't have that route - #8639

Merged
pi0 merged 2 commits into
mainfrom
fix/generate-index
Nov 3, 2022
Merged

fix(nuxt): don't force prerender / if user doesn't have that route#8639
pi0 merged 2 commits into
mainfrom
fix/generate-index

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

nuxt/nuxt#14168

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

With pages module, we add routes to the default routes values. But if the user doesn't have a ~/pages/index.vue file we can safely skip processing the default / route for prerender.routes.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe added the bug Something isn't working label Nov 2, 2022
@danielroe
danielroe requested a review from pi0November 2, 2022 18:53
@danielroedanielroe self-assigned this Nov 2, 2022
@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Nov 2, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitae971f0
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6362bcf97166060008c5585f

@atinux

Copy link
Copy Markdown
Member

What about if the user has an app.vue but no pages? I think we should keep rendering the home page in that case

@danielroe

Copy link
Copy Markdown
MemberAuthor

Yes, agreed. This change only affects the pages ad-hoc module. (So it only prevents force-rendering a 404.)

@pi0

pi0 commented Nov 3, 2022

Copy link
Copy Markdown
Member

Would it still generate index.html for spa mode? (it is main fallback file) (checked, it does with /index.html route)

pi0
pi0 approved these changes Nov 3, 2022
@pi0
pi0 merged commit 71ecffa into mainNov 3, 2022
@pi0
pi0 deleted the fix/generate-index branch November 3, 2022 14:52
@pi0pi0 mentioned this pull request Nov 3, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@danielroe@atinux@pi0