Eliminate per page index.pageContext.json files #649
Unanswered
kripainc
asked this question in
Help & Questions
Replies: 1 comment 3 replies
-
If you don't define any Is it causing any problems? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there in configuration option to suppress generating index.pageContext.json files?
(content of this file is page specific and looks like: {"pageContext":{"_pageId":"/pages/select/@id"}}
I am migrating a large site (90K+ pages) from Gatsby/React to vite-plugin-ssr. This creates 90K+ directories with a single 'index.pageContext.json' file. It's also fetched by client when rendering the page.
ENVIRONMENT: vite: 4.0.4, vite-plugin-ssr: 0.4.82, node: v16.18.0 (linux Kubuntu),
Also, using vite config option to suppress building sub-directories for html files (which is working correctly): ssr({ prerender: { noExtraDir: true, }}), and did not specify 'export { passToClient }' option in any of my *.page.server.tsx files.
All pages are SSG, and do not require any data to be injected on the client side.
Q1: Is there a way to eliminate generating sub-folders for each index.pageContext.json file?
Q2: Is there a way to suppress fetching individual index.pageContext.json file?
Thanks for the great vite plugin. I really enjoyed the DX.
Beta Was this translation helpful? Give feedback.
All reactions