vue.config.js 里面的配置,如果更新到vue3 vite 项目中,配置要怎么改呢?
// file: vue.config.js
module.exports = {
configureWebpack: config => {
Object.assign(config.resolve, {
alias: {
// 加上对
'dashPackages': resolve('node_modules/@gcpaas/dash-board-ui/packages'),
}
})
},
chainWebpack: config => {
config.module
.rule('svg')
.exclude
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/dataSourceIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/pageIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/appPrependIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/bigScreenIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/Svgs/svg'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/dataSourceIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/pageIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/appPrependIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/assets/images/bigScreenIcon/svg'))
.add(resolve('./node_modules/@gcpaas/dash-board-ui/packages/Svgs/svg'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
},
transpileDependencies: [
'@gcpaas/dash-board-ui'
]
}
vue.config.js 里面的配置,如果更新到vue3 vite 项目中,配置要怎么改呢?