Replace Webpack with Vite (#4765)
Co-authored-by: Tom Moor <tom@getoutline.com> Co-authored-by: Vio <vio@beanon.com>
This commit is contained in:
@@ -16,41 +16,11 @@ import useCurrentTeam from "~/hooks/useCurrentTeam";
|
||||
import usePolicy from "~/hooks/usePolicy";
|
||||
import { matchDocumentSlug as slug } from "~/utils/routeHelpers";
|
||||
|
||||
const SettingsRoutes = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "settings" */
|
||||
"./settings"
|
||||
)
|
||||
);
|
||||
const Document = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-document" */
|
||||
"~/scenes/Document"
|
||||
)
|
||||
);
|
||||
const Collection = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "collection" */
|
||||
"~/scenes/Collection"
|
||||
)
|
||||
);
|
||||
const Home = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "home" */
|
||||
"~/scenes/Home"
|
||||
)
|
||||
);
|
||||
const Search = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "search" */
|
||||
"~/scenes/Search"
|
||||
)
|
||||
);
|
||||
const SettingsRoutes = React.lazy(() => import("./settings"));
|
||||
const Document = React.lazy(() => import("~/scenes/Document"));
|
||||
const Collection = React.lazy(() => import("~/scenes/Collection"));
|
||||
const Home = React.lazy(() => import("~/scenes/Home"));
|
||||
const Search = React.lazy(() => import("~/scenes/Search"));
|
||||
|
||||
const RedirectDocument = ({
|
||||
match,
|
||||
|
||||
@@ -6,41 +6,11 @@ import FullscreenLoading from "~/components/FullscreenLoading";
|
||||
import Route from "~/components/ProfiledRoute";
|
||||
import { matchDocumentSlug as slug } from "~/utils/routeHelpers";
|
||||
|
||||
const Authenticated = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-authenticated" */
|
||||
"~/components/Authenticated"
|
||||
)
|
||||
);
|
||||
const AuthenticatedRoutes = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-authenticated-routes" */
|
||||
"./authenticated"
|
||||
)
|
||||
);
|
||||
const SharedDocument = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "shared-document" */
|
||||
"~/scenes/Document/Shared"
|
||||
)
|
||||
);
|
||||
const Login = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "login" */
|
||||
"~/scenes/Login"
|
||||
)
|
||||
);
|
||||
const Logout = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "logout" */
|
||||
"~/scenes/Logout"
|
||||
)
|
||||
);
|
||||
const Authenticated = React.lazy(() => import("~/components/Authenticated"));
|
||||
const AuthenticatedRoutes = React.lazy(() => import("./authenticated"));
|
||||
const SharedDocument = React.lazy(() => import("~/scenes/Document/Shared"));
|
||||
const Login = React.lazy(() => import("~/scenes/Login"));
|
||||
const Logout = React.lazy(() => import("~/scenes/Logout"));
|
||||
|
||||
export default function Routes() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user