The manifest contains mappings of module IDs to their associated chunks and asset files.
I did’t find context.modules for vite react ssr. The @vitejs/plugin-vue supports it for vue. What about the @vitejs/plugin-react?
Is there a vite plugin which supports context.modules for react SSR ?
2
Answers
I added a plugin to obtain module dependencies
I’m building exactly this because vite doesn’t support preloading lazy loaded modules or CSS chunks in an application full of React.lazy() pages.
It’s based of the regular manifest.json because it contains the proper import mappings which ssr-manifest.json does not.
https://github.com/wille/vite-preload