.fes.predev.one.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * @Description:
  3. * @Version: 1.668
  4. * @Autor: 地虎降天龙
  5. * @Date: 2023-10-16 10:53:09
  6. * @LastEditors: 地虎降天龙
  7. * @LastEditTime: 2026-03-28 13:26:53
  8. */
  9. import { defineBuildConfig } from '@fesjs/fes'
  10. import copyPublicWithPluginExclusion from './src/common/copySelectedPublicDirsPlugin.js'
  11. export default defineBuildConfig({
  12. layout: {
  13. title: 'TvT.js',
  14. navigation: 'top',
  15. multiTabs: false,
  16. isFixedHeader: true,
  17. logo: 'logo.png',
  18. menus: [
  19. {
  20. name: 'preview',
  21. path: '/',
  22. title: '📀 预览演示',
  23. },
  24. {
  25. path: 'https://gitee.com/ice-gl/icegl-three-vue-tres',
  26. title: '📜 源码地址',
  27. },
  28. {
  29. title: '📚 说明文档',
  30. children: [
  31. {
  32. path: 'http://docs.icegl.cn',
  33. title: '🧊 TvT框架文档',
  34. },
  35. {
  36. path: 'https://threejs.org/docs/index.html#manual/zh/introduction/Creating-a-scene',
  37. title: '🎲 three.js',
  38. },
  39. {
  40. path: 'https://tresjs.org/guide/',
  41. title: '⚡ tres.js',
  42. },
  43. {
  44. path: 'https://fesjs.mumblefe.cn/',
  45. title: '💠 fes.js',
  46. },
  47. ],
  48. },
  49. {
  50. path: 'https://www.bilibili.com/video/BV1LH4y1p7Yn',
  51. title: '📀 TvT视频教程',
  52. },
  53. {
  54. path: 'https://www.icegl.cn/tvtstore',
  55. title: '🧩 插件市场',
  56. },
  57. {
  58. path: 'https://www.icegl.cn/',
  59. title: '🧊 ICEGL官网',
  60. },
  61. {
  62. title: '👨‍🏫 课程中心',
  63. children: [
  64. {
  65. path: 'https://icegl.cn/courses',
  66. title: '🌁 WebGL初/中/高级教程',
  67. },
  68. {
  69. path: 'https://www.bilibili.com/video/BV1iR4y1C7LQ/',
  70. title: '🏙 WebGL Shader初级教程',
  71. },
  72. {
  73. path: 'http://m.study.163.com/provider/480000002303414/index.htm?share=2&shareId=480000002303414',
  74. title: '🌇 WebGL Shader中级教程',
  75. },
  76. ],
  77. },
  78. {
  79. path: 'https://www.icegl.cn/ask',
  80. title: '🙋‍♀️ 社区问答',
  81. },
  82. {
  83. path: 'https://www.icegl.cn/tvtstore/uniAppView',
  84. title: '🪅 小程序生态',
  85. },
  86. {
  87. path: 'https://www.icegl.cn/d/demand/post',
  88. title: '🪢 定制开发',
  89. },
  90. {
  91. path: 'https://www.icegl.cn/p/tvtdeveloper.html',
  92. title: '💫 加入我们',
  93. },
  94. ],
  95. },
  96. viteOption: {
  97. build: {
  98. copyPublicDir: false, // 禁止 Vite 默认复制 public 目录
  99. },
  100. plugins: [
  101. copyPublicWithPluginExclusion(), // 不用传值,内部自动处理
  102. ],
  103. server: {
  104. proxy: {
  105. // 开发代理服务器配置
  106. '/api.icegl': {
  107. target: 'https://www.icegl.cn/',
  108. changeOrigin: true,
  109. rewrite: (path) => path.replace(/^\/api.icegl/, ''),
  110. },
  111. // 天地图本地代理
  112. '/tianditu.map': {
  113. target: 'https://t0.tianditu.gov.cn/',
  114. changeOrigin: true,
  115. headers: {
  116. Origin: 'opensource.icegl.cn',
  117. Referer: 'http://opensource.icegl.cn',
  118. },
  119. rewrite: (path) => path.replace(/^\/tianditu.map/, ''),
  120. }
  121. },
  122. },
  123. },
  124. })