vue.config.js 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. const Timestamp = new Date().getTime();
  2. module.exports = {
  3. lintOnSave: false,
  4. devServer: {
  5. port: 8184, // 端口
  6. proxy: {
  7. '/api': {
  8. target: 'http://192.168.0.3:19095/',
  9. changeOrigin: true,
  10. pathRewrite: {
  11. '^/api': '',
  12. }
  13. },
  14. '/bpi': {
  15. target: 'http://192.168.0.3:19096/',
  16. changeOrigin: true,
  17. pathRewrite: {
  18. '^/bpi': '',
  19. }
  20. }
  21. }
  22. },
  23. configureWebpack: {
  24. output: { // 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】
  25. filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
  26. chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
  27. }
  28. },
  29. // 输出文件目录
  30. // outputDir: 'D:/wwwroot/webApp/build',//windows输出目录
  31. outputDir: '/Users/macbook/Working/vueBuild/flyLong/WeChatApp',//mac输出目录
  32. }