build: Add async chunk names (#2170)
This commit is contained in:
@@ -20,7 +20,9 @@ import Route from "components/ProfiledRoute";
|
||||
import SocketProvider from "components/SocketProvider";
|
||||
import { matchDocumentSlug as slug } from "utils/routeHelpers";
|
||||
|
||||
const SettingsRoutes = React.lazy(() => import("./settings"));
|
||||
const SettingsRoutes = React.lazy(() =>
|
||||
import(/* webpackChunkName: "settings" */ "./settings")
|
||||
);
|
||||
|
||||
const NotFound = () => <Search notFound />;
|
||||
const RedirectDocument = ({ match }: { match: Match }) => (
|
||||
|
||||
@@ -6,11 +6,23 @@ import FullscreenLoading from "components/FullscreenLoading";
|
||||
import Route from "components/ProfiledRoute";
|
||||
import { matchDocumentSlug as slug } from "utils/routeHelpers";
|
||||
|
||||
const Authenticated = React.lazy(() => import("components/Authenticated"));
|
||||
const AuthenticatedRoutes = React.lazy(() => import("./authenticated"));
|
||||
const KeyedDocument = React.lazy(() => import("scenes/Document/KeyedDocument"));
|
||||
const Login = React.lazy(() => import("scenes/Login"));
|
||||
const Logout = React.lazy(() => import("scenes/Logout"));
|
||||
const Authenticated = React.lazy(() =>
|
||||
import(/* webpackChunkName: "authenticated" */ "components/Authenticated")
|
||||
);
|
||||
const AuthenticatedRoutes = React.lazy(() =>
|
||||
import(/* webpackChunkName: "authenticated-routes" */ "./authenticated")
|
||||
);
|
||||
const KeyedDocument = React.lazy(() =>
|
||||
import(
|
||||
/* webpackChunkName: "keyed-document" */ "scenes/Document/KeyedDocument"
|
||||
)
|
||||
);
|
||||
const Login = React.lazy(() =>
|
||||
import(/* webpackChunkName: "login" */ "scenes/Login")
|
||||
);
|
||||
const Logout = React.lazy(() =>
|
||||
import(/* webpackChunkName: "logout" */ "scenes/Logout")
|
||||
);
|
||||
|
||||
export default function Routes() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user