Open yzhengwei opened 7 months ago
You can try the following code
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
configureWebpack: {
plugins: [
require('unplugin-icons/webpack').default({
compiler: 'vue3',
autoInstall: true
}),
require('unplugin-vue-components/webpack').default({
resolvers: [
require('unplugin-icons/resolver').default({
enabledCollections: ['ep']
}),
require('unplugin-vue-components/resolvers').ElementPlusResolver()
]
})
]
}
})
Describe the bug
When I created a js project using vue-cli, I wanted to auto import elementplus and icons , but the project couldn't run after the import。 the package.json like this:
vue.config.js:
and this is the error:
Reproduction
3
System Info
Used Package Manager
npm
Validations