标签:.config bpa 创建 src 方法 lint resolve webp lin
const webpack = require(‘webpack‘) const path = require(‘path‘); function resolve(dir) { return path.join(__dirname, dir); } module.exports = { lintOnSave: true, chainWebpack: (config) => { config.resolve.alias .set(‘@‘, resolve(‘src‘)) .set(‘@assets‘,resolve(‘src/assets‘)) .set(‘styles‘,resolve(‘src/assets/styles‘)) // 这里只写了两个个,你可以自己再加,按这种格式.set(‘‘, resolve(‘‘)) } }
标签:.config bpa 创建 src 方法 lint resolve webp lin
原文地址:https://www.cnblogs.com/qiushanjian/p/10428821.html