Add chunk names/prefetch hint
This commit is contained in:
parent
2a78834c1d
commit
2525e9ca31
30
src/App.tsx
30
src/App.tsx
|
@ -11,11 +11,31 @@ import { RuntimeContext, useRuntime } from "./useRuntime";
|
||||||
import { AppConfig, AppConfigContext } from "./useAppConfig";
|
import { AppConfig, AppConfigContext } from "./useAppConfig";
|
||||||
import { SourcifySource } from "./url";
|
import { SourcifySource } from "./url";
|
||||||
|
|
||||||
const Block = React.lazy(() => import("./Block"));
|
const Block = React.lazy(
|
||||||
const BlockTransactions = React.lazy(() => import("./BlockTransactions"));
|
() => import(/* webpackChunkName: "block", webpackPrefetch: true */ "./Block")
|
||||||
const AddressTransactions = React.lazy(() => import("./AddressTransactions"));
|
);
|
||||||
const Transaction = React.lazy(() => import("./Transaction"));
|
const BlockTransactions = React.lazy(
|
||||||
const London = React.lazy(() => import("./special/london/London"));
|
() =>
|
||||||
|
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 App = () => {
|
||||||
const runtime = useRuntime();
|
const runtime = useRuntime();
|
||||||
|
|
Loading…
Reference in New Issue