File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1+ import "../styles/lazyGlob.css" ;
2+
3+ const Lazy = ( ) => {
4+ return < > </ >
5+ }
6+
7+ export default Lazy ;
Original file line number Diff line number Diff line change @@ -70,11 +70,13 @@ export const CommonTests = (props: { routeModuleClass?: string }) => (
7070 comment = "FOUC during client-side navigation, on Chrome."
7171 />
7272 < Test component = "Route" file = "notRendered.css" class = "notRendered" integration = "url" invert />
73+ < Test component = "Lazy" file = "lazy.css" class = "lazy" lazy />
7374 < Test
74- component = "Lazy "
75- file = "lazy .css"
76- class = "lazy "
75+ component = "LazyGlob "
76+ file = "lazyGlob .css"
77+ class = "lazyGlob "
7778 lazy
79+ comment = { 'Imported via "import.meta.glob".' }
7880 />
7981 < Test
8082 component = "LazyLink"
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ const LazyMountAssets = lazy(() => import("../components/lazyMountAssets"));
1313const LazyLinkTmp = lazy ( ( ) => import ( "../components/lazyLinkTmp" ) ) ;
1414const LazyMountAssetsTmp = lazy ( ( ) => import ( "../components/lazyMountAssetsTmp" ) ) ;
1515
16+ const entries = import . meta. glob ( "../components/lazyG*.tsx" ) ;
17+ const LazyGlob = lazy ( Object . values ( entries ) [ 0 ] as any ) ;
18+
1619const getData = query ( async ( ) => {
1720 "use server" ;
1821 await new Promise ( res => setTimeout ( res , 1000 ) ) ;
@@ -29,6 +32,7 @@ export default function Home() {
2932 < link rel = "stylesheet" href = { notRenderedInlineCSS } />
3033 </ Show >
3134 < Lazy />
35+ < LazyGlob />
3236 < LazyLink />
3337 < LazyMountAssets />
3438 < Show when = { ! data ( ) } >
Original file line number Diff line number Diff line change 1+ .lazyGlob {
2+ background-color : var (--color-success );
3+ }
You can’t perform that action at this time.
0 commit comments