mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-30 06:12:47 -07:00
fix(packages/lazy-fn-vite-plugin): make dynamic function detection stricter (#223)
This commit is contained in:
committed by
GitHub
parent
6135fd7e1b
commit
7626ed8d1d
@@ -0,0 +1,14 @@
|
||||
import React, { Suspense, type JSX } from "react";
|
||||
import { dynamic } from "tuono";
|
||||
|
||||
const DynamicComponent = dynamic(() => import("../components/DynamicComponent"))
|
||||
|
||||
const Loading = (): JSX.Element => <>Loading</>
|
||||
|
||||
export default function IndexPage(): JSX.Element {
|
||||
return (
|
||||
<Suspense fallback={<Loading />}>
|
||||
<DynamicComponent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user