prod.js 1.5KB

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