소스 검색

fix: /h5/形式配置改造

szr190 2 달 전
부모
커밋
73bba6ee02
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/manifest.json
  2. 2 1
      vite.config.ts

+ 1 - 1
src/manifest.json

@@ -54,7 +54,7 @@
54 54
     "quickapp" : {},
55 55
     "h5" : {
56 56
         "router" : {
57
-            "base" : "/",
57
+            "base" : "/h5/",
58 58
             "mode" : "history"
59 59
         },
60 60
         "sdkConfigs" : {

+ 2 - 1
vite.config.ts

@@ -8,7 +8,7 @@ export default defineConfig(({ command, mode }) => {
8 8
   if (mode === 'development' || mode === 'sandbox') {
9 9
     // 测试环境配置
10 10
     return {
11
-      base: '/',
11
+      base: '/h5/',
12 12
       plugins: [uni()],
13 13
       // envDir: resolve(__dirname, 'env'),
14 14
       define: {
@@ -21,6 +21,7 @@ export default defineConfig(({ command, mode }) => {
21 21
   } else if (mode === 'production') {
22 22
     // 生产环境配置
23 23
     return {
24
+      base: '/h5/',
24 25
       plugins: [uni()],
25 26
       // envDir: resolve(__dirname, 'env'),
26 27
       define: {