vue.config.js 761 B

123456789101112131415161718
  1. module.exports = {
  2. // publicPath: './', // 署应用包时的基本 URL。 vue-router hash 模式使用
  3. publicPath: '/h5/', //署应用包时的基本 URL。 vue-router history模式使用
  4. outputDir: 'dist', // 生产环境构建文件的目录
  5. assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录
  6. lintOnSave: false,
  7. filenameHashing: false,
  8. productionSourceMap: false, // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
  9. devServer: {
  10. port: 9090, // 端口
  11. open: true, // 启动后打开浏览器
  12. overlay: {
  13. //当出现编译器错误或警告时,在浏览器中显示全屏覆盖层
  14. warnings: false,
  15. errors: true
  16. }
  17. },
  18. }