12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: '""',
  9. AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
  10. DEFAULT_POS: '"116.34761502876347,31.40974743425614"', // 霍山县人民政府 gcj02
  11. VERSION: '"1.1.29-20240224"',
  12. },
  13. mini: {},
  14. h5: {
  15. /**
  16. * WebpackChain 插件配置
  17. * @docs https://github.com/neutrinojs/webpack-chain
  18. */
  19. // webpackChain(chain) {
  20. /**
  21. * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
  22. * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
  23. */
  24. // chain
  25. // .plugin("analyzer")
  26. // .use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin, []);
  27. /**
  28. * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
  29. * @docs https://github.com/chrisvfritz/prerender-spa-plugin
  30. */
  31. // const path = require("path");
  32. // const Prerender = require("prerender-spa-plugin");
  33. // const staticDir = path.join(__dirname, "..", "dist");
  34. // chain.plugin("prerender").use(
  35. // new Prerender({
  36. // staticDir,
  37. // routes: ["/pages/index/index"],
  38. // postProcess: (context) => ({
  39. // ...context,
  40. // outputPath: path.join(staticDir, "index.html"),
  41. // }),
  42. // })
  43. // );
  44. },
  45. // },
  46. };