perf: format code with better style (#5283)

This commit is contained in:
Vben
2025-01-01 11:39:49 +08:00
committed by GitHub
parent 4d81b9d18d
commit 081d2aed23
288 changed files with 1805 additions and 2164 deletions

View File

@@ -10,11 +10,11 @@ import { minify } from 'html-minifier-terser';
const DEFAULT_PROVIDER = 'jspm.io';
type pluginOptions = {
type pluginOptions = GeneratorOptions & {
debug?: boolean;
defaultProvider?: 'esm.sh' | 'jsdelivr' | 'jspm.io';
importmap?: Array<{ name: string; range?: string }>;
} & GeneratorOptions;
};
// async function getLatestVersionOfShims() {
// const result = await fetch('https://ga.jspm.io/npm:es-module-shims');

View File

@@ -1,3 +1,5 @@
import type { PluginOption } from 'vite';
import fs from 'node:fs';
import fsp from 'node:fs/promises';
import { join } from 'node:path';
@@ -5,8 +7,6 @@ import { fileURLToPath } from 'node:url';
import { readPackageJSON } from '@vben/node-utils';
import { type PluginOption } from 'vite';
/**
* 用于生成将loading样式注入到项目中
* 为多app提供loading样式无需在每个 app -> index.html单独引入

View File

@@ -67,11 +67,11 @@ async function loadAndConvertEnv(
match = 'VITE_',
confFiles = getConfFiles(),
): Promise<
{
Partial<ApplicationPluginOptions> & {
appTitle: string;
base: string;
port: number;
} & Partial<ApplicationPluginOptions>
}
> {
const envConfig = await loadEnv(match, confFiles);