Open m0ksem opened 2 weeks ago
After resolvePath force added, nuxt loads components from different places:
import {VaButton as __nuxt_component_0} from "/_nuxt/node_modules/.pnpm/vuestic-ui@1.10.3_vue@3.5.12/node_modules/vuestic-ui/dist/es/main.js?v=0e702035";
import {VaButton as ImportedButton, useGlobalConfig as useImportedGlobalConfig, } from "/_nuxt/node_modules/.cache/vite/client/deps/vuestic-ui.js?v=6d032d21";
Initially, I though problem in incorrect condition exports in vuestic package.json (fixed in #4404), but eventually I noticed that import * from 'vuestic-ui'
resolves import from vite cache.
v3.12.1 works fine
Repro: https://stackblitz.com/edit/github-poqjmh?file=package.json,nuxt.config.ts,app.vue
when component used via auto-import it ignores vuestic.config.ts
Although, if component is imported from 'vuestic-ui' via
import
config is applied correctly.Looks like nuxt imports from
esm-node
build when registering global components, instead ofes
since 3.13.2may be related to: https://github.com/nuxt/nuxt/pull/28843/files#diff-06cc43bd13b65d1b07374d99f41947196c616c32398339ed40d0a3faa678ad2dR174
Now when nuxt ensures filePath, resolvePath from mlly uses node condition with higher priority.
We could replace component registration with absolute path manually.