lex 2 年之前
父节点
当前提交
7667037ef8
共有 4 个文件被更改,包括 1216 次插入59 次删除
  1. 713 20
      package-lock.json
  2. 1 0
      package.json
  3. 7 0
      vite.config.ts
  4. 495 39
      yarn.lock

文件差异内容过多而无法显示
+ 713 - 20
package-lock.json


+ 1 - 0
package.json

@@ -77,6 +77,7 @@
     "typescript": "^4.5.2",
     "vite": "^2.7.3",
     "vite-plugin-glsl": "^0.2.0",
+    "vite-plugin-pwa": "^0.5.6",
     "vite-plugin-style-import": "^1.4.0",
     "vue-eslint-parser": "^8.0.1",
     "vue-tsc": "^0.29.8",

+ 7 - 0
vite.config.ts

@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import styleImport from 'vite-plugin-style-import'
 import glsl from 'vite-plugin-glsl'
+import { VitePWA } from 'vite-plugin-pwa'
 import vueJsx from '@vitejs/plugin-vue-jsx'
 import legacy from '@vitejs/plugin-legacy'
 // eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -35,6 +36,12 @@ export default defineConfig({
           resolveStyle: name => `vant/es/${name}/style`
         }
       ]
+    }),
+    VitePWA({
+      workbox: {
+        cleanupOutdatedCaches: true,
+      },
+      base: './',
     })
   ],
   resolve: {

文件差异内容过多而无法显示
+ 495 - 39
yarn.lock


部分文件因为文件数量过多而无法显示