perf: format code with better style (#5283)
This commit is contained in:
@@ -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');
|
||||
|
@@ -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单独引入
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user