From 97fdc7c428ec6084e33acd86c67e630525d07e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MANSUY?= Date: Thu, 4 Dec 2025 19:17:47 +0800 Subject: [PATCH] cherry-pick df52ce98 --- 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 cbc601e6..c89c34b4 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')