unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.66k stars 341 forks source link

No known conditions for "./lib" specifier in "element-plus" package #700

Open pmatisko opened 9 months ago

pmatisko commented 9 months ago

Describe the bug

Hello,

I get this error: " No known conditions for "./lib" specifier in "element-plus" package" for all versions of Element plus after 2.3.7. My configuration is very simple. Only very basic minimalistic setup, one component. Thank you for any help.

Packages versions:

  "unplugin-auto-import": "^0.16.6", 
  "unplugin-element-plus": "^0.8.0",
  "unplugin-vue-components": "^0.25.2",
  "vite": "4.4.9",

Vite config plugins:

const plugins = [
nodeResolve(),
viteSSR(),
vue(),
AutoImport({
    resolvers: [ElementPlusResolver({ ssr: true })],
}),
  Components({
      resolvers: [
          ElementPlusResolver({ ssr: true }),
      ],
  }),
]

App.vue without Element plus import

<template>
    <div>
        <el-button type="primary">Button</el-button>
    </div>
</template>

This commit of Element Plus changed the exports in package.json. If the Element Plus version is correct, then auto import has to be updated. (https://github.com/element-plus/element-plus/pull/13498/files)

Reproduction

-

System Info

Windows 10
npm v9.6.6
node v18.16.0

Used Package Manager

npm

Validations