index.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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://site2.pre.aizhuishu.com/",
  21. // target: "https://site14.leyuee.com",
  22. target: "https://sitenry50j5o5l3e8k6p.leyuee.com",
  23. changeOrigin: true
  24. },
  25. "/testLogin": {
  26. // target: "http://site2.pre.aizhuishu.com/",
  27. // target: "https://site14.leyuee.com",
  28. target: "https://sitenry50j5o5l3e8k6p.leyuee.com",
  29. changeOrigin: true
  30. }
  31. },
  32. // Various Dev Server settings
  33. host: "localhost", // can be overwritten by process.env.HOST
  34. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  35. autoOpenBrowser: false,
  36. errorOverlay: true,
  37. notifyOnErrors: true,
  38. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  39. /**
  40. * Source Maps
  41. */
  42. // https://webpack.js.org/configuration/devtool/#development
  43. // devtool: "cheap-module-eval-source-map",
  44. devtool: "cheap-module-eval-source-map",
  45. // If you have problems debugging vue-files in devtools,
  46. // set this to false - it *may* help
  47. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  48. cacheBusting: true,
  49. // CSS Sourcemaps off by default because relative paths are "buggy"
  50. // with this option, according to the CSS-Loader README
  51. // (https://github.com/webpack/css-loader#sourcemaps)
  52. // In our experience, they generally work as expected,
  53. // just be aware of this issue when enabling this option.
  54. cssSourceMap: false,
  55. disableHostCheck: true
  56. },
  57. build: {
  58. // Template for index.html
  59. index: path.resolve(__dirname, "../dist/index.html"),
  60. // Paths
  61. assetsRoot: path.resolve(__dirname, "../dist"),
  62. assetsSubDirectory:
  63. "static" + new Date().toLocaleDateString().replace(/\//g, "-"),
  64. assetsPublicPath: "https://cdn-novel.bookkks.com/",
  65. /**
  66. * Source Maps
  67. */
  68. productionSourceMap: true,
  69. // https://webpack.js.org/configuration/devtool/#production
  70. devtool: "#source-map",
  71. // Gzip off by default as many popular static hosts such as
  72. // Surge or Netlify already gzip all static assets for you.
  73. // Before setting to `true`, make sure to:
  74. // npm install --save-dev compression-webpack-plugin
  75. productionGzip: false,
  76. productionGzipExtensions: ["js", "css"],
  77. // Run the build command with an extra argument to
  78. // View the bundle analyzer report after build finishes:
  79. // `npm run build --report`
  80. // Set to `true` or `false` to always turn it on or off
  81. bundleAnalyzerReport: process.env.npm_config_report
  82. }
  83. };