前端2

unplugin/unplugin-auto-import: Auto import APIs on-demand for Vite, Webpack and Rollup

"terser": "^5.43.1",//Es6压缩
"unplugin-auto-import": "^19.3.0",//自动导入,https://github.com/unplugin/unplugin-auto-import
"unplugin-vue-router": "^0.14.0",//https://github.com/posva/unplugin-vue-router
npm install npm-run-all --save-dev

optimizeDeps:https://cn.vite.dev/config/dep-optimization-options
https://github.com/unplugin/unplugin-vue-components, https://www.npmjs.com/package/unplugin-vue-components
import {
  AntDesignVueResolver,
  ElementPlusResolver,
  VantResolver,
} from 'unplugin-vue-components/resolvers'
// vite.config.js
import Components from 'unplugin-vue-components/vite'

// your plugin installation
Components({
  resolvers: [
    AntDesignVueResolver(),
    ElementPlusResolver(),
    VantResolver(),
  ],
})
https://github.com/unplugin/unplugin-vue-components/blob/main/src/core/resolvers/antdv.ts

 

posted @ 2025-07-03 16:22  CharyGao  阅读(8)  评论(0)    收藏  举报