删除vite-plugin-pwa

pull/755/merge
zhangdaiscott 2023-09-20 10:20:44 +08:00
parent b227d5f338
commit d8e0226d87
6 changed files with 3 additions and 40 deletions

View File

@ -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=

View File

@ -24,8 +24,5 @@ VITE_GLOB_API_URL_PREFIX=
# 是否启用图像压缩
VITE_USE_IMAGEMIN= true
# 使用pwa
VITE_USE_PWA = false
# 是否兼容旧浏览器
VITE_LEGACY = false

View File

@ -1,33 +0,0 @@
/**
* vite-plugin-pwavitevitepwa
* 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 [];
}

View File

@ -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",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB