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

feat(nuxt): add ssr route rule to enable SPA mode - #7938

Merged
danielroe merged 5 commits into
mainfrom
feat/spa-route-rule
Oct 11, 2022
Merged

feat(nuxt): add ssr route rule to enable SPA mode#7938
danielroe merged 5 commits into
mainfrom
feat/spa-route-rule

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

https://github.com/nuxt/framework/discussions/560

❓ 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

This change adds a ssr route rule to easily enable SPA mode for a route or group of routes:

Usage

exportdefaultdefineNuxtConfig({nitro: {routes: {'/test': {ssr: false}}}})

When nitrojs/nitro#538 merges (or in another PR implementing something like nitrojs/nitro@da12900), we can also refactor this to depend on event.context.routeOptions rather than having to construct a fresh matcher within the nuxt renderer.

📝 Checklist

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

@danielroedanielroe added enhancement New feature or request nitro 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Sep 30, 2022
@danielroe
danielroe requested a review from pi0September 30, 2022 20:39
@danielroedanielroe self-assigned this Sep 30, 2022
@codesandbox

Copy link
Copy Markdown

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

@netlify

netlifyBot commented Sep 30, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit3373ba3
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63457b69bdac260009c71fd5

@vercel
vercelBot temporarily deployed to Preview September 30, 2022 20:47 Inactive
@danielroedanielroe mentioned this pull request Oct 9, 2022
@danielroe
danielroe requested a review from atinuxOctober 11, 2022 15:33
@danielroe
danielroe merged commit 5f003a9 into mainOct 11, 2022
@danielroe
danielroe deleted the feat/spa-route-rule branch October 11, 2022 16:03
@danielroedanielroe mentioned this pull request Oct 25, 2022
7 tasks
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xenhancementNew feature or requestnitro🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@danielroe@atinux