mirror of
https://github.com/outline/outline.git
synced 2026-12-03 18:10:36 +03:00
fix: Revert framer async load (#13384)
This commit is contained in:
1 parent
c29c97441d
commit
2be80e6401
3 files changed
+7
-10
No files matched your search
+2
-7
@@ -1,6 +1,6 @@
|
||||
// oxlint-disable-next-line import/no-unresolved
|
||||
import "vite/modulepreload-polyfill";
|
||||
import { LazyMotion } from "framer-motion";
|
||||
import { LazyMotion, domMax } from "framer-motion";
|
||||
import { KBarProvider } from "kbar";
|
||||
import { Provider } from "mobx-react";
|
||||
import { configure as configureMobx } from "mobx";
|
||||
@@ -33,11 +33,6 @@ import { ActionContextProvider } from "./hooks/useActionContext";
|
||||
// Load plugins as soon as possible
|
||||
void PluginManager.loadPlugins();
|
||||
|
||||
// Motion features are loaded async to keep them out of the initial bundle,
|
||||
// animations begin once loaded.
|
||||
const loadMotionFeatures = () =>
|
||||
import("~/utils/motionFeatures").then((mod) => mod.default);
|
||||
|
||||
initI18n(env.DEFAULT_LANGUAGE);
|
||||
|
||||
// Register ahead of rendering so the capture-phase listeners run before any
|
||||
@@ -76,7 +71,7 @@ if (element) {
|
||||
<ErrorBoundary showTitle>
|
||||
<KBarProvider actions={[]} options={commandBarOptions}>
|
||||
<LazyPolyfill>
|
||||
<LazyMotion features={loadMotionFeatures}>
|
||||
<LazyMotion features={domMax}>
|
||||
<PageScroll>
|
||||
<PageTheme />
|
||||
<ScrollToTop>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { domMax } from "framer-motion";
|
||||
|
||||
export default domMax;
|
||||
@@ -214,6 +214,11 @@ export default ({ mode }: ConfigEnv) =>
|
||||
test: /node_modules[\\/](yjs|y-prosemirror|y-indexeddb|@hocuspocus|lib0)/,
|
||||
priority: 20,
|
||||
},
|
||||
{
|
||||
name: "vendor-framer-motion",
|
||||
test: /node_modules[\\/]framer-motion/,
|
||||
priority: 20,
|
||||
},
|
||||
{
|
||||
name: "vendor-styled",
|
||||
test: /node_modules[\\/](styled-components|stylis)/,
|
||||
|
||||
Reference in new issue
Block a user