Closed whitetrefoil closed 2 years ago
Yeah, I know this kind of issue is tricky. We have one in zustand: https://github.com/pmndrs/zustand/pull/953
We might need to support both:
import babelTemplate from "@babel/template";
const templateBuilder = babelTemplate.default || babelTemplate;
What do you think? @Thisen
Yeah, I know this kind of issue is tricky. We have one in zustand: pmndrs/zustand#953
We might need to support both:
import babelTemplate from "@babel/template"; const templateBuilder = babelTemplate.default || babelTemplate;
What do you think? @Thisen
Lets do it. I'll prepare a PR.
When using
'jotai/babel/plugin-react-refresh'
w/ vite it throwstemplateBuilder is not a function
at/node_modules/jotai/esm/babel/plugin-react-refresh.mjs
.According to @babel/template #13719, when using native mjs, it requires
instead of normal