diff --git a/.env.development b/.env.development index 0e5eb14..60d6a9c 100644 --- a/.env.development +++ b/.env.development @@ -7,12 +7,12 @@ VITE_PUBLIC_PATH = / # 跨域代理,您可以配置多个 ,请注意,没有换行符 VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] -#后台接口父地址(必填) -VITE_GLOB_API_URL=/jeecgboot - #后台接口全路径地址(必填) VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot +#后台接口父地址(必填) +VITE_GLOB_API_URL=/jeecgboot + # 接口前缀 VITE_GLOB_API_URL_PREFIX= diff --git a/.env.production b/.env.production index 19a9629..9465a64 100644 --- a/.env.production +++ b/.env.production @@ -24,8 +24,5 @@ VITE_GLOB_API_URL_PREFIX= # 是否启用图像压缩 VITE_USE_IMAGEMIN= true -# 使用pwa -VITE_USE_PWA = false - # 是否兼容旧浏览器 VITE_LEGACY = false diff --git a/build/vite/plugin/pwa.ts b/build/vite/plugin/pwa.ts deleted file mode 100644 index 006d059..0000000 --- a/build/vite/plugin/pwa.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * vite-plugin-pwa是vite的一个官方插件,它的功能就是通过简单的配置将你的vite项目变成pwa应用 - * https://github.com/antfu/vite-plugin-pwa - */ -import { VitePWA } from 'vite-plugin-pwa'; - -export function configPwaConfig(env: ViteEnv) { - const { VITE_USE_PWA, VITE_GLOB_APP_TITLE, VITE_GLOB_APP_SHORT_NAME } = env; - - if (VITE_USE_PWA) { - // vite-plugin-pwa - const pwaPlugin = VitePWA({ - manifest: { - name: VITE_GLOB_APP_TITLE, - short_name: VITE_GLOB_APP_SHORT_NAME, - icons: [ - { - src: './resource/img/pwa-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: './resource/img/pwa-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - ], - }, - }); - return pwaPlugin; - } - return []; -} diff --git a/package.json b/package.json index 7c36f14..1d34655 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,6 @@ "vite-plugin-mkcert": "^1.16.0", "vite-plugin-mock": "^2.9.6", "vite-plugin-purge-icons": "^0.9.2", - "vite-plugin-pwa": "^0.16.4", "vite-plugin-style-import": "^2.0.0", "vite-plugin-svg-icons": "^2.0.1", "@rys-fe/vite-plugin-theme": "^0.8.6", diff --git a/public/resource/img/pwa-192x192.png b/public/resource/img/pwa-192x192.png deleted file mode 100644 index 00fb815..0000000 Binary files a/public/resource/img/pwa-192x192.png and /dev/null differ diff --git a/public/resource/img/pwa-512x512.png b/public/resource/img/pwa-512x512.png deleted file mode 100644 index a417073..0000000 Binary files a/public/resource/img/pwa-512x512.png and /dev/null differ