prod.js 1.6KB

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