File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1+ import { lazy } from 'preact-iso' ;
2+
13import Jumbotron from './jumbotron' ;
24import GithubRepos from './github-repos' ;
35import TodoList from './todo-list' ;
46import Logo from './logo' ;
57import Toc from './table-of-contents' ;
6- import BlogOverview from './blog-overview' ;
78import Sponsors from './sponsors' ;
8- import WeAreUsing from './we-are-using' ;
9- import Branding from './branding' ;
109import TabGroup from './tab-group' ;
1110
11+ // Hoist the CSS to avoid FOUC
12+ import './branding/style.module.css' ;
13+ import './blog-overview/style.module.css' ;
14+ import './we-are-using/style.module.css' ;
15+
16+ const Branding = lazy ( ( ) => import ( './branding' ) ) ;
17+ const BlogOverview = lazy ( ( ) => import ( './blog-overview' ) ) ;
18+ const WeAreUsing = lazy ( ( ) => import ( './we-are-using' ) ) ;
19+
1220export default {
1321 Toc,
1422 BlogOverview,
Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ export default defineConfig({
2828 return 'assets/xmldom-[hash].js' ;
2929 if ( chunkInfo . facadeModuleId ?. includes ( '@docsearch/react' ) )
3030 return 'assets/docsearch-[hash].js' ;
31+
32+ if ( chunkInfo . facadeModuleId ?. includes ( 'branding' ) )
33+ return 'assets/branding-[hash].js' ;
34+ if ( chunkInfo . facadeModuleId ?. includes ( 'blog-overview' ) )
35+ return 'assets/blog-overview-[hash].js' ;
36+ if ( chunkInfo . facadeModuleId ?. includes ( 'we-are-using' ) )
37+ return 'assets/we-are-using-[hash].js' ;
38+
3139 return 'assets/[name]-[hash].js' ;
3240 }
3341 }
You can’t perform that action at this time.
0 commit comments