egg
egg
Explore posts from servers
SSolidJS
Created by chiefcll on 8/13/2024 in #support
Solid Router - Lazy import section of site in one bundle / lazy add routes
users_and_settings.ts
export { default as Users } from 'src/users'
export { default as Settings } from 'src/settings'
export { default as Users } from 'src/users'
export { default as Settings } from 'src/settings'
router
<Route component={lazy(() => import('src/users_and_settings').then(v => ({ default: v.Users })))

<Route component={lazy(() => import('src/users_and_settings').then(v => ({ default: v.Settings })))
<Route component={lazy(() => import('src/users_and_settings').then(v => ({ default: v.Users })))

<Route component={lazy(() => import('src/users_and_settings').then(v => ({ default: v.Settings })))
Creates 1 chunk
5 replies