diff --git a/src/App.tsx b/src/App.tsx index 846e61f..110d626 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,11 +11,31 @@ import { RuntimeContext, useRuntime } from "./useRuntime"; import { AppConfig, AppConfigContext } from "./useAppConfig"; import { SourcifySource } from "./url"; -const Block = React.lazy(() => import("./Block")); -const BlockTransactions = React.lazy(() => import("./BlockTransactions")); -const AddressTransactions = React.lazy(() => import("./AddressTransactions")); -const Transaction = React.lazy(() => import("./Transaction")); -const London = React.lazy(() => import("./special/london/London")); +const Block = React.lazy( + () => import(/* webpackChunkName: "block", webpackPrefetch: true */ "./Block") +); +const BlockTransactions = React.lazy( + () => + import( + /* webpackChunkName: "blocktxs", webpackPrefetch: true */ "./BlockTransactions" + ) +); +const AddressTransactions = React.lazy( + () => + import( + /* webpackChunkName: "address", webpackPrefetch: true */ "./AddressTransactions" + ) +); +const Transaction = React.lazy( + () => + import(/* webpackChunkName: "tx", webpackPrefetch: true */ "./Transaction") +); +const London = React.lazy( + () => + import( + /* webpackChunkName: "london", webpackPrefetch: true */ "./special/london/London" + ) +); const App = () => { const runtime = useRuntime();