From e341b45429ed84f61d7d0dfaf870065bce58eb61 Mon Sep 17 00:00:00 2001 From: yangxu52 Date: Thu, 6 Mar 2025 23:54:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=9E=8B=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用defineConfig自带类型推断,无需单独声明类型 --- vite.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 8f44b95..b29dd40 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,9 @@ -import { type UserConfig, type ConfigEnv, loadEnv, defineConfig } from 'vite'; +import { defineConfig, loadEnv } from 'vite'; import createPlugins from './vite/plugins'; import autoprefixer from 'autoprefixer'; // css自动添加兼容性前缀 - import path from 'path'; -export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { + +export default defineConfig(({ mode, command }) => { const env = loadEnv(mode, process.cwd()); return { // 部署生产环境和开发环境下的URL。