prod.js 1.3 KB

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