在vue.config.js中配置configureWebpack
module.exports = {
lintOnSave: false,
productionSourceMap: true,
// publicPath: process.env.NODE_ENV === 'production' ? '/h5/' : '/',
chainWebpack(config) {
config.resolve.alias.set('@', resolve('./src'))
config.plugin('html').tap(args => {
args[0].title = website.systemName
return args
})
},
//configureWebpack才是生效用的
configureWebpack:{
name:name,
resolve:{
alias:{
'@':resolve('src')
}
}
},
}
<van-image
style="margin:1.35rem 0 1.35rem 5px;"
round
width="2.3rem"
height="2.3rem"
:src="require('@/assets/home/audit.png')"
/>
网友评论