项目场景:
安装并配置elementPlus报错。
问题描述
"plugins" is not allowed. plugins不被允许。参考官网修改配置文件vue.config.js。
解决方案:
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')module.exports = {configureWebpack: (config) => {config.plugins.push(AutoImport({resolvers: [ElementPlusResolver()]}))config.plugins.push(Components({resolvers: [ElementPlusResolver()]}))}
}