Files
ClassContent/历届学生/韩想/项目开发/课程项目/管理后台/vue.config.js
2024-09-27 02:06:13 +08:00

38 lines
964 B
JavaScript

const path = require('path');
module.exports = {
publicPath: './',
// 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);
}