You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which scope/s are relevant/related to the feature request?
vite-plugin-nitro
Information
There was a use case brought up in Discord about supporting client-only sections of the app. As an example, every URL under the /admin path should not go through SSR, but should just return the index.html.
Describe any alternatives/workarounds you're currently using
Use the main.server.ts to eagerly return the document for certain paths
exportdefaultasyncfunctionrender(url: string,document: string){// client-render any admin URLsif(url.includes('admin')){returnPromise.resolve(document);}// Server-render anything that's not prerenderedconsthtml=awaitrenderApplication(bootstrap,{
document,
url,});returnhtml;}
I would be willing to submit a PR to fix this issue
Yes
No
The text was updated successfully, but these errors were encountered:
brandonroberts
changed the title
Nitro: Provide better API for client-only rendering
Nitro: Provide better API for client-only rendering when using SSR
Dec 20, 2023
Which scope/s are relevant/related to the feature request?
vite-plugin-nitro
Information
There was a use case brought up in Discord about supporting client-only sections of the app. As an example, every URL under the
/admin
path should not go through SSR, but should just return the index.html.Describe any alternatives/workarounds you're currently using
Use the
main.server.ts
to eagerly return the document for certain pathsI would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: