Closed JStuve closed 2 years ago
Thanks for reporting!
Hm, it uses cjs/loader, but picks "esm".
I wonder if they use "module" condition or "import" condition, but maybe we shouldn't use import.meta
for "module" condition.
Can you try this? https://ci.codesandbox.io/status/pmndrs/zustand/pr/1393 See "Local Install Instruction" ☝️
Tested with and without Turbopack, works great! Thanks for fix!
Thanks for reporting! Hm, it uses cjs/loader, but picks "esm". I wonder if they use "module" condition or "import" condition, but maybe we shouldn't use
import.meta
for "module" condition.
get the same error on rspack
It happens when when a bundler picks "import" condition, but it doesn't let browsers to load as ESM.
In Jotai, we discuss about possible migration paths until all bundlers support ESM fully.
FYI,
maybe we shouldn't use import.meta for "module" condition.
We no longer use import.meta
for "module".
It happens when when a bundler picks "import" condition, but it doesn't let browsers to load as ESM.
In Jotai, we discuss about possible migration paths until all bundlers support ESM fully.
FYI,
maybe we shouldn't use import.meta for "module" condition.
We no longer use
import.meta
for "module".
I'm using the latest zustand, still getting this error. Is there some kind of webpack configuration to bypass this issue?
check these:
module.exports = {
//...
resolve: {
conditionNames: ['module'],
},
};
With the announcement at NextJS Conf, I was eager to try out the speeds of Turbopack. I installed and setup the most basic state for Zustand and was presented with the follow error that's specific to
'zustand/middleware'
devtools
integration:It's worth noting that the error only occurs using the "Turbopack" command
next dev --turbo
.