prod.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. LOGO: '"https://comon-image.oss-cn-hangzhou.aliyuncs.com/miniPrograme/logo.png"',
  13. HOME_LOGO: '"https://comon-image.oss-cn-hangzhou.aliyuncs.com/miniPrograme/home_logo_hrqb.png"',
  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.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
  36. // .plugin('prerender')
  37. // .use(new Prerender({
  38. // staticDir,
  39. // routes: [ '/pages/index/index' ],
  40. // postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
  41. // }))
  42. // }
  43. },
  44. };