step1、创建

$ vue create testProject // 【说明】testProject 是自己的项目名,可自定义。

step2、安装 less、less-loader

yarn add less less-loader --dev

step3、配置 vue.config.js

// vue.config.js
module.exports = {
  // 这里的配置,就可以部署在服务器非根目录下了
  publicPuth: '',
  chainWebpack: config => {
    // 配置 eslint 保存时自动修复
    config.module
    .rule('eslint')
    .use('eslink-loader')
    .tap(options => {
      // 修改它的选项...
      options.fix = true

      return options
    })

    // 配置 html 文件 title
    config
    .plugin('html')
    .tap(args => {
      args[0].title = process.env.VUE_APP_TITLE
    })
  }
}

以上这样就完成了我日常需要的简单配置了。 o^o

有什么意见或建议欢迎一起讨论。

以上。