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 :) Trying vue-demi (as a dependency of vue-global-api) on latest nuxt3 version, production build fails since there is no import matcher. (and currently node condition is set to cjs)
Could not resolve import "vue-demi" in ..../node_modules/vue-global-api/onActivated.mjs using exports defined in ..../node_modules/vue-demi/package.json
It can be fixed by adding import field to package.json: (should be ideally esm build)
Note: I think it would be much better if you tend to use explicit .mjs and .cjs extensions so that tooling can infer module type.
Note: SSR vs Node: node condition can be added to niro resolver but since there are also non Node.js SSR environments (like Cloudflare workers) we would need import only support
The text was updated successfully, but these errors were encountered:
Hi :) Trying
vue-demi
(as a dependency ofvue-global-api
) on latest nuxt3 version, production build fails since there is noimport
matcher. (and currently node condition is set to cjs)It can be fixed by adding
import
field to package.json: (should be ideally esm build)"exports": { ".": { "require": "./lib/index.cjs.js", ++ "import": "./lib/index.cjs.js", "node": "./lib/index.cjs.js", "browser": "./lib/index.esm.js" }, "./*": "./*" },
.mjs
and.cjs
extensions so that tooling can infer module type.node
condition can be added to niro resolver but since there are also non Node.js SSR environments (like Cloudflare workers) we would need import only supportThe text was updated successfully, but these errors were encountered: