prod.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. module.exports = {
  2. env: {
  3. NODE_ENV: '"production"',
  4. },
  5. defineConstants: {
  6. // HOST: '"http://192.168.89.147:9087"',
  7. // HOST: '"https://wmcj.ycjcjy.com"',
  8. HOST: '"http://wmb.pzhkai.cn"',
  9. MAPHOST: '"http://wmb.pzhkai.cn/api2"',
  10. QMAP_WEBSERVICE_KEY: '"HTPBZ-HHJA7-XD2XD-PRS37-H3HVJ-U5BAA"',
  11. AD_IMAGE: '"http://wmb.pzhkai.cn/upload/images/citizen_banner.png"',
  12. DEFAULT_POS: '"101.718514,26.582455"', // 攀枝花市人民政府 gcj02
  13. VERSION: '"1.1.29-20240224"',
  14. },
  15. mini: {},
  16. h5: {
  17. /**
  18. * WebpackChain 插件配置
  19. * @docs https://github.com/neutrinojs/webpack-chain
  20. */
  21. // webpackChain(chain) {
  22. /**
  23. * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
  24. * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
  25. */
  26. // chain
  27. // .plugin("analyzer")
  28. // .use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin, []);
  29. /**
  30. * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
  31. * @docs https://github.com/chrisvfritz/prerender-spa-plugin
  32. */
  33. // const path = require("path");
  34. // const Prerender = require("prerender-spa-plugin");
  35. // const staticDir = path.join(__dirname, "..", "dist");
  36. // chain.plugin("prerender").use(
  37. // new Prerender({
  38. // staticDir,
  39. // routes: ["/pages/index/index"],
  40. // postProcess: (context) => ({
  41. // ...context,
  42. // outputPath: path.join(staticDir, "index.html"),
  43. // }),
  44. // })
  45. // );
  46. },
  47. // },
  48. };