Skip to content

Advice on how to enable SSR and CSR at the same time for a modern.js app #7020

Answered by zllkjc
giancarlosisasi asked this question in Q&A
Discussion options

You must be logged in to vote

Your usage is correct, but there's a slight misunderstanding. In ssrByEntries, each key represents an entry, not routes. For example, if you have src/csr and src/ssr, then you should configure it as:

server: {
  ssr: true,
  ssrByEntries: {
    csr: false,
  },
},

Than, all routes in csr entry is client render.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by giancarlosisasi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants