Rollup failed to resolve import "element-plus/es/utils" from " This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to `build.rollupOptions.external` error during build:
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:)
两个解决办法 一个是改 vite.config.ts
‘element-plus’: pathResolve(‘./node_modules/element-plus’),
另外一个改导入
import {
isArray,
isDate,
buildProps,
definePropType
} from ‘element-plus/es/utils/index’