mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-25 16:16:20 +08:00
chore: remove vite-plugin-pwa
This commit is contained in:
@@ -24,7 +24,3 @@ VITE_GLOB_UPLOAD_URL=/upload
|
|||||||
|
|
||||||
# Interface prefix
|
# Interface prefix
|
||||||
VITE_GLOB_API_URL_PREFIX=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|
||||||
|
|
||||||
# use pwa
|
|
||||||
VITE_USE_PWA = false
|
|
||||||
|
@@ -25,7 +25,3 @@ VITE_GLOB_UPLOAD_URL=/upload
|
|||||||
|
|
||||||
# Interface prefix
|
# Interface prefix
|
||||||
VITE_GLOB_API_URL_PREFIX=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|
||||||
|
|
||||||
# use pwa
|
|
||||||
VITE_USE_PWA = false
|
|
||||||
|
@@ -5,7 +5,6 @@ import purgeIcons from 'vite-plugin-purge-icons';
|
|||||||
import windiCSS from 'vite-plugin-windicss';
|
import windiCSS from 'vite-plugin-windicss';
|
||||||
import VitePluginCertificate from 'vite-plugin-mkcert';
|
import VitePluginCertificate from 'vite-plugin-mkcert';
|
||||||
import { configHtmlPlugin } from './html';
|
import { configHtmlPlugin } from './html';
|
||||||
import { configPwaConfig } from './pwa';
|
|
||||||
import { configMockPlugin } from './mock';
|
import { configMockPlugin } from './mock';
|
||||||
import { configCompressPlugin } from './compress';
|
import { configCompressPlugin } from './compress';
|
||||||
import { configVisualizerConfig } from './visualizer';
|
import { configVisualizerConfig } from './visualizer';
|
||||||
@@ -54,9 +53,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
|||||||
vitePlugins.push(
|
vitePlugins.push(
|
||||||
configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE),
|
configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE),
|
||||||
);
|
);
|
||||||
|
|
||||||
// vite-plugin-pwa
|
|
||||||
vitePlugins.push(configPwaConfig(viteEnv));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return vitePlugins;
|
return vitePlugins;
|
||||||
|
@@ -1,33 +0,0 @@
|
|||||||
/**
|
|
||||||
* Zero-config PWA for Vite
|
|
||||||
* 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 [];
|
|
||||||
}
|
|
@@ -179,7 +179,6 @@
|
|||||||
"vite-plugin-mkcert": "^1.6.0",
|
"vite-plugin-mkcert": "^1.6.0",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
"vite-plugin-purge-icons": "^0.8.1",
|
"vite-plugin-purge-icons": "^0.8.1",
|
||||||
"vite-plugin-pwa": "^0.11.13",
|
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
"vite-plugin-theme": "^0.8.6",
|
"vite-plugin-theme": "^0.8.6",
|
||||||
"vite-plugin-windicss": "^1.8.4",
|
"vite-plugin-windicss": "^1.8.4",
|
||||||
|
1516
pnpm-lock.yaml
generated
1516
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
1
types/global.d.ts
vendored
1
types/global.d.ts
vendored
@@ -58,7 +58,6 @@ declare global {
|
|||||||
|
|
||||||
declare interface ViteEnv {
|
declare interface ViteEnv {
|
||||||
VITE_USE_MOCK: boolean;
|
VITE_USE_MOCK: boolean;
|
||||||
VITE_USE_PWA: boolean;
|
|
||||||
VITE_PUBLIC_PATH: string;
|
VITE_PUBLIC_PATH: string;
|
||||||
VITE_PROXY: [string, string][];
|
VITE_PROXY: [string, string][];
|
||||||
VITE_GLOB_APP_TITLE: string;
|
VITE_GLOB_APP_TITLE: string;
|
||||||
|
Reference in New Issue
Block a user