index.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * @Author: ZhengXiaowei
  3. * @Date: 2019-04-12 14:35:42
  4. * LastEditors: 晓晓晓晓晓丶vv
  5. * LastEditTime: 2020-08-21 15:26:55
  6. * @Description: file content
  7. */
  8. "use strict";
  9. // Template version: 1.2.8
  10. // see http://vuejs-templates.github.io/webpack for documentation.
  11. const path = require("path");
  12. // "https://siteywmkx29emyevn514.leyuee.com/
  13. module.exports = {
  14. dev: {
  15. // Paths
  16. assetsSubDirectory: "static",
  17. assetsPublicPath: "/",
  18. proxyTable: {
  19. "/api": {
  20. target: "http://isiteywmkx29emyevn514.pre.aizhuishu.com",
  21. changeOrigin: true
  22. },
  23. "/testLogin": {
  24. target: "http://isiteywmkx29emyevn514.pre.aizhuishu.com",
  25. changeOrigin: true
  26. }
  27. },
  28. // Various Dev Server settings
  29. host: "127.0.0.1", // can be overwritten by process.env.HOST
  30. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  31. autoOpenBrowser: false,
  32. errorOverlay: true,
  33. notifyOnErrors: true,
  34. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  35. /**
  36. * Source Maps
  37. */
  38. // https://webpack.js.org/configuration/devtool/#development
  39. // devtool: "cheap-module-eval-source-map",
  40. devtool: "cheap-module-eval-source-map",
  41. // If you have problems debugging vue-files in devtools,
  42. // set this to false - it *may* help
  43. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  44. cacheBusting: true,
  45. // CSS Sourcemaps off by default because relative paths are "buggy"
  46. // with this option, according to the CSS-Loader README
  47. // (https://github.com/webpack/css-loader#sourcemaps)
  48. // In our experience, they generally work as expected,
  49. // just be aware of this issue when enabling this option.
  50. cssSourceMap: false,
  51. disableHostCheck: true
  52. },
  53. build: {
  54. // Template for index.html
  55. index: path.resolve(__dirname, "../dist/index.html"),
  56. // Paths
  57. assetsRoot: path.resolve(__dirname, "../dist"),
  58. assetsSubDirectory:
  59. "static" + new Date().toLocaleDateString().replace(/\//g, "-"),
  60. assetsPublicPath: "https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/zsy_ios_app/",
  61. /**
  62. * Source Maps
  63. */
  64. productionSourceMap: true,
  65. // https://webpack.js.org/configuration/devtool/#production
  66. devtool: "#source-map",
  67. // Gzip off by default as many popular static hosts such as
  68. // Surge or Netlify already gzip all static assets for you.
  69. // Before setting to `true`, make sure to:
  70. // npm install --save-dev compression-webpack-plugin
  71. productionGzip: false,
  72. productionGzipExtensions: ["js", "css"],
  73. // Run the build command with an extra argument to
  74. // View the bundle analyzer report after build finishes:
  75. // `npm run build --report`
  76. // Set to `true` or `false` to always turn it on or off
  77. bundleAnalyzerReport: process.env.npm_config_report
  78. }
  79. };