element-plus [Build] [message, loading] No known conditions for “.“ entry in “vite-aliases“ package in [2.3.8]

wkftcu5l  于 4个月前  发布在  其他
关注(0)|答案(3)|浏览(52)

Bug Type: Build

Environment

  • Vue Version: 3.3.4
  • Element Plus Version: 2.3.8
  • Browser / OS: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
  • Build Tool: Vite

Reproduction

  • el-message
  • el-loading

Element Plus Playground

Steps to reproduce

// main.ts
import 'element-plus/lib/components/message/style/css'
import 'element-plus/lib/components/loading/style/css'
//npm run dev

// error

What is Expected?

npm run dev
// success

What is actually happening?

// error
No known conditions for "./lib/components/message/style/css" entry in "element-plus" package
No known conditions for "./lib/components/loading/style/css" entry in "element-plus" package

Additional comments

(empty)

sbdsn5lh

sbdsn5lh1#

Sorry, due to recent adjustments to the export configuration, please use version 2.3.7 first.
or

import 'element-plus/lib/components/message/style/css.js'
import 'element-plus/lib/components/loading/style/css.js'
zd287kbt

zd287kbt2#

any progress on resolving this issue?

  • the issue still exists with release 2.5.3.
  • for the project i'm working on i'm running into the issue when pulling in a locale file: import nl from 'element-plus/lib/locale/lang/nl'
  • when i revert to release 2.3.7 there's no issue.
  • this does not work: import nl from 'element-plus/lib/locale/lang/nl.js'
mi7gmzs6

mi7gmzs63#

the issue still exists with release 2.6.2.
when will this problem be solved.

相关问题