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