prod.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = {
  2. env: {
  3. NODE_ENV: '"production"'
  4. },
  5. defineConstants: {
  6. "ENV": '"PRODUCTION"',
  7. // "HOST": '"https://api.bicredit.xin"',
  8. "HOST": '"http://192.168.0.168:810"',
  9. "APPID": '"422"'
  10. },
  11. mini: {},
  12. h5: {
  13. /**
  14. * WebpackChain 插件配置
  15. * @docs https://github.com/neutrinojs/webpack-chain
  16. */
  17. // webpackChain (chain) {
  18. // /**
  19. // * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
  20. // * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
  21. // */
  22. // chain.plugin('analyzer')
  23. // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
  24. // /**
  25. // * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
  26. // * @docs https://github.com/chrisvfritz/prerender-spa-plugin
  27. // */
  28. // const path = require('path')
  29. // const Prerender = require('prerender-spa-plugin')
  30. // const staticDir = path.join(__dirname, '..', 'dist')
  31. // chain
  32. // .plugin('prerender')
  33. // .use(new Prerender({
  34. // staticDir,
  35. // routes: [ '/pages/index/index' ],
  36. // postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
  37. // }))
  38. // }
  39. }
  40. }