赞
踩
在package.json的devDependencies,然后npm install
"unplugin-auto-import": "^0.11.2",
"unplugin-vue-components": "^0.22.7"
const {defineConfig} = require('@vue/cli-service') const AutoImport = require('unplugin-auto-import/webpack') const Components = require('unplugin-vue-components/webpack') const {ElementPlusResolver} = require('unplugin-vue-components/resolvers') module.exports = defineConfig({ configureWebpack: (config) => { if (!config.plugins) { config.plugins = [] } config.plugins.push( AutoImport({ resolvers: [ElementPlusResolver()] }) ) config.plugins.push( Components({ resolvers: [ElementPlusResolver()] }) ) } })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。