prod.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module.exports = {
  2. env: {
  3. NODE_ENV: '"production"',
  4. },
  5. defineConstants: {
  6. ENV: '"PRODUCTION"',
  7. // HOST: '"https://api.bicredit.xin"',
  8. HOST: '"https://api.hrshuke.cn"',
  9. // "HOST": '"http://192.168.0.168:810"',
  10. // 格式化后,如果HOME_LOGO和APPID的值有换行,请手动修改格式回去!!!否则mycli修改不会生效!!!HOME_LOGO:还有APPID:后面还有个空格!!!
  11. APPID: '"458"',
  12. CHANNELCODE: '"hrqbxcx"',
  13. LOGO: '"https://comon-image.oss-cn-hangzhou.aliyuncs.com/miniPrograme/logo.png"',
  14. HOME_LOGO: '"https://comon-image.oss-cn-hangzhou.aliyuncs.com/miniPrograme/home_logo_hrqb.png"',
  15. },
  16. mini: {},
  17. h5: {
  18. /**
  19. * WebpackChain 插件配置
  20. * @docs https://github.com/neutrinojs/webpack-chain
  21. */
  22. // webpackChain (chain) {
  23. // /**
  24. // * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
  25. // * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
  26. // */
  27. // chain.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
  37. // .plugin('prerender')
  38. // .use(new Prerender({
  39. // staticDir,
  40. // routes: [ '/pages/index/index' ],
  41. // postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
  42. // }))
  43. // }
  44. },
  45. };