Files
ClassContent/历届学生/韩想/shop/myshop/vue.config.js
2024-09-27 02:06:13 +08:00

41 lines
871 B
JavaScript

const path = require('path');
module.exports = {
publicPath: './',
devServer: {
inline: false
},
css: {
loaderOptions: {
postcss: {
plugins: [
require('postcss-pxtorem')({
rootValue: 37.5, // 换算的基数
selectorBlackList: [ 'weui', 'mu' ], // 忽略转换正则匹配项
propList: [ '*' ]
})
]
}
}
},
chainWebpack: (config) => {
// 配置pug的
config.module.rule('pug')
.test(/\.pug$/)
.use('pug-html-loader')
.loader('pug-html-loader')
.end();
// 路径别名
config.resolve.alias
.set('@', resolve('src'))
.set('@com', resolve('src/components'))
.set('@less', resolve('src/assets/less'))
}
}
function resolve (dir) {
return path.join(__dirname, dir);
}