vue.config.js 956 B

123456789101112131415161718192021222324252627282930
  1. const axios_default_ip = process.env.NODE_ENV == 'dev' ? 'http://121.41.102.225:83' : 'http://121.41.102.225:83'
  2. //http://192.168.0.171:83
  3. process.env.VUE_APP_BASE_URL = axios_default_ip
  4. const Timestamp = new Date().getTime();
  5. module.exports = {
  6. chainWebpack:config => {
  7. if (process.env.NODE_ENV === 'prd') {
  8. config.output.filename('js/[name].' + Timestamp + '.js').end();
  9. config.output.chunkFilename('js/[name].' + Timestamp + '.js').end();
  10. }
  11. },
  12. publicPath:'./',
  13. outputDir:'dist',
  14. assetsDir:'static',
  15. indexPath:'index.html',
  16. productionSourceMap:false,
  17. devServer: {
  18. proxy: {
  19. '/proxy': {
  20. target: axios_default_ip,
  21. ws: true, // proxy websockets
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/proxy': '' // rewrite path
  25. }
  26. }
  27. }
  28. },
  29. lintOnSave: false//禁用eslint 便于开发
  30. }