feat: support pwa

This commit is contained in:
vben
2024-06-16 15:45:15 +08:00
parent 222c73963d
commit 382652e0f4
24 changed files with 1787 additions and 128 deletions

View File

@@ -10,8 +10,8 @@ import { type PluginOption } from 'vite';
* 为多app提供loading样式无需在每个 app -> index.html单独引入
*/
async function viteInjectAppLoadingPlugin(
isBuild: string,
env: Record<string, any>,
isBuild: boolean,
env: Record<string, any> = {},
): Promise<PluginOption | undefined> {
const loadingHtml = await getLoadingRawByHtmlTemplate();
const envRaw = isBuild ? 'prod' : 'dev';