Skip to content

arthurgailes/vite-plugin-ssr_dynamic-import-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Import with vite-plugin-ssr

See: https://vite-plugin-ssr.com/dynamic-import

This is an example of how to defer loading of specific components within an SSR/SSG framework. The text and styling are loaded by the server, and the dynamic component (Map.jsx) is loaded on the client side. In this case, loading the react-leaflet library would crash the application on the server, so index.page.jsx defers its loading until client rendering.

git@github.com:arthurgailes/vite-plugin-ssr_dynamic-import-example.git
cd vite-plugin-ssr_dynamic-import-example/
npm install
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published