From 2be80e6401a056dc1fa04083a0e55b2ed159a6c1 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 10 Aug 2026 20:27:06 -0400 Subject: [PATCH] fix: Revert framer async load (#13384) --- app/index.tsx | 9 ++------- app/utils/motionFeatures.ts | 3 --- vite.config.ts | 5 +++++ 3 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 app/utils/motionFeatures.ts diff --git a/app/index.tsx b/app/index.tsx index 21d619cae8..14159dc37e 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -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) { - + diff --git a/app/utils/motionFeatures.ts b/app/utils/motionFeatures.ts deleted file mode 100644 index dee70d5fcc..0000000000 --- a/app/utils/motionFeatures.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { domMax } from "framer-motion"; - -export default domMax; diff --git a/vite.config.ts b/vite.config.ts index 8901912f33..40e3f92191 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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)/,