build(projects): vite.config代码优化

This commit is contained in:
Soybean
2022-03-13 16:47:19 +08:00
parent d0522ce514
commit ca707a456b
13 changed files with 94 additions and 52 deletions

View File

@ -1,6 +1,6 @@
import { loadEnv } from 'vite';
import type { ConfigEnv, PluginOption } from 'vite';
import { createHtmlPlugin } from 'vite-plugin-html'; // html插件(使用变量、压缩)
import { createHtmlPlugin } from 'vite-plugin-html';
export default (config: ConfigEnv): PluginOption[] => {
const viteEnv = loadEnv(config.mode, `.env.${config.mode}`);