From df52ce98d8daeafcf1e6c2e38c62e66359848d1f Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 14 Oct 2025 04:07:44 +0800 Subject: [PATCH] Revert vite.config.ts to origin version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • webui will be created automatically on build --- lightrag_webui/vite.config.ts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lightrag_webui/vite.config.ts b/lightrag_webui/vite.config.ts index 8e616961..2957b743 100644 --- a/lightrag_webui/vite.config.ts +++ b/lightrag_webui/vite.config.ts @@ -1,30 +1,12 @@ import { defineConfig } from 'vite' import path from 'path' -import { existsSync, mkdirSync } from 'fs' import { webuiPrefix } from '@/lib/constants' import react from '@vitejs/plugin-react-swc' import tailwindcss from '@tailwindcss/vite' -const ensureWebuiDir = () => ({ - name: 'ensure-webui-dir', - apply: 'build' as const, - buildStart() { - const outDir = path.resolve(__dirname, '../lightrag/api/webui') - if (!existsSync(outDir)) { - mkdirSync(outDir, { recursive: true }) - } - }, - closeBundle() { - const outDir = path.resolve(__dirname, '../lightrag/api/webui') - if (!existsSync(outDir)) { - mkdirSync(outDir, { recursive: true }) - } - } -}) - // https://vite.dev/config/ export default defineConfig({ - plugins: [react(), tailwindcss(), ensureWebuiDir()], + plugins: [react(), tailwindcss()], resolve: { alias: { '@': path.resolve(__dirname, './src')