足力健前端,vue版本

uni.config.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const fs = require('fs')
  2. const path = require('path')
  3. const COMPONENTS_DIR_NAME = 'wxcomponents'
  4. module.exports = {
  5. options: {
  6. cssVars: {
  7. '--status-bar-height': '25px',
  8. '--window-top': '0px',
  9. '--window-bottom': '0px'
  10. },
  11. extnames: {
  12. style: '.qss',
  13. template: '.qml',
  14. filter: '.wxs'
  15. },
  16. filterTag: 'wxs',
  17. project: 'project.config.json',
  18. subPackages: true
  19. },
  20. copyWebpackOptions (platformOptions, vueOptions) {
  21. const copyOptions = [
  22. // 'sitemap.json',
  23. // 'ext.json',
  24. 'custom-tab-bar'
  25. ]
  26. const workers = platformOptions.workers
  27. workers && copyOptions.push(workers)
  28. const wxcomponentsDir = path.resolve(process.env.UNI_INPUT_DIR, COMPONENTS_DIR_NAME)
  29. if (fs.existsSync(wxcomponentsDir)) {
  30. copyOptions.push({
  31. from: wxcomponentsDir,
  32. to: COMPONENTS_DIR_NAME,
  33. ignore: ['**/*.vue', '**/*.css'] // v3 会自动转换生成vue,css文件,需要过滤
  34. })
  35. }
  36. return copyOptions
  37. }
  38. }