vue.config.js 333 B

123456789101112
  1. const path = require('path')
  2. const resolve = dir => {
  3. return path.join(__dirname, dir)
  4. }
  5. module.exports = {
  6. publicPath: './',
  7. transpileDependencies: [],
  8. chainWebpack: config => {
  9. config.resolve.alias
  10. .set('_c', resolve('src/components')) // key,value自行定义,比如.set('@@', resolve('src/components'))
  11. },
  12. }