Open AxiomeCG opened 1 year ago
I have a similar problem.
Uncaught Error: require() of ES Module /Users/purrweb/momentum-max-frontend/node_modules/framer-motion-3d/node_modules/react-merge-refs/dist/index.mjs not supported.
I can solve it by adding the {"type": "module"}
line to the package.json of framer-motion-3d.
But this will only help on localhost.
I use "framer-motion": "10.12.16", "framer-motion-3d": "10.12.16", "next": "13.4.4",
Try adding this to next.config.mjs
transpilePackages: ['framer-motion-3d']
Description of the bug
When using
import { motion } from "framer-motion-3d"
with Webpack, it fails to compile. It seems to relate to the same issue we have with theframer-motion
package in the issue #1525 but cannot make work a workaround similar to the one we find for the normal package.Have you a quick fix to make the 3D package for react-three-fiber usage ?