auto-animate
auto-animate copied to clipboard
Not working in next.js
I tried with next 10, react 16.8, node 16.13 and it gives me the following error
./node_modules/@formkit/auto-animate/react/index.mjs
Can't import the named export 'useEffect' from non EcmaScript module (only default export is available)
Can confirm the same issue in vanilla React 17.0.2
AutoAnimate is ESM only at the moment. can you provide a reproduction of the issue?
I tried to reproduce with a code sandbox with zero issues. Looking around, it seems that it may be related to webpack configuration. My team is using CRA so I may be SOL.
Related StackOverflow: https://stackoverflow.com/questions/69343038/cant-import-the-named-export-xxxx-from-non-ecmascript-module-only-default-expo
@zbaker94 sorry for the late reply, yes I tried that one before you posted it and it solved the problem. We have some custom config, so this defo could be the culprit.