How to use static-adapter with partial CSR for dynamic routes? #12936
Replies: 1 comment 7 replies
-
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For my use case, I have to have a static site, so I believe the
static-adapter
is the only choice.In the app
/store
lists a list of items fetched from database (dynamic), to willgoto()
/store/[id]
when an item is selected.The app should fetch data from database and render the
[id]
page. These are all dynamic, and I don't expect them to be pre-renderred.Another route is
/settings
and is expected to be pre-renderred.I couldn't figure out how to do this.
Error I get looks like this
I've tried to set
export const csr=true
in/store/[id]/+page.ts
and/store/[id]/+layout.ts
but don't seem to work.The only option to get the app built is by setting
fallback: "index.html"
in config, but this seems to turn the entire app into a CSR SPA and I don't want this.Is there a way to pre-render some pages and make some pages CSR?
Beta Was this translation helpful? Give feedback.
All reactions