You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I've stumbled into LazyMotion not work when moving from framer-motion 12.0.0-alpha.1 to motion 12.4.3 (Issue is still present in 12.4.7), and it's unclear why. We have been using the mini variant before the m was moved into its own dist folder. Seems like something how it's being now imported causes issues?
From the docs this example should work:
import{LazyMotion,domAnimation}from"motion/react"// Load only the domAnimation packagefunctionApp({ children }){return(<LazyMotionfeatures={domAnimation}>{children}</LazyMotion>)}
But after swapping the m imports to import * as m from "motion/react-m";, it'll not work, see the CodeSandbox example.
I believe a clue is that there's some modules being mismatched in the final bundle. If you take a look into the "expected.tsx" file, you'll see that TS is not super happy with the MotionStyle and MotionValue types. They are incompatible with the imports from motion/react, and this might be because some symbol reference is mismatched?
The example in the CodeSandbox seems like it should be valid given that the example in the docs is not working.
IMPORTANT: Provide a CodeSandbox reproduction of the bug
Describe the bug
Hi. I've stumbled into LazyMotion not work when moving from framer-motion
12.0.0-alpha.1
to motion12.4.3
(Issue is still present in12.4.7
), and it's unclear why. We have been using the mini variant before them
was moved into its own dist folder. Seems like something how it's being now imported causes issues?From the docs this example should work:
But after swapping the
m
imports toimport * as m from "motion/react-m";
, it'll not work, see the CodeSandbox example.I believe a clue is that there's some modules being mismatched in the final bundle. If you take a look into the "expected.tsx" file, you'll see that TS is not super happy with the
MotionStyle
andMotionValue
types. They are incompatible with the imports frommotion/react
, and this might be because some symbol reference is mismatched?The example in the CodeSandbox seems like it should be valid given that the example in the docs is not working.
IMPORTANT: Provide a CodeSandbox reproduction of the bug
👉 https://codesandbox.io/p/sandbox/s9k25c
Steps to reproduce
import * as m from "motion/react-m";
and is not working.Expected behavior
The LazyMotion should load the features correctly.
Video or screenshots
Environment details
The text was updated successfully, but these errors were encountered: