Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Vite Config

From Leeroopedia
Revision as of 11:23, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_Vite_Config.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Frontend, Build_System, Configuration
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete Vite build tool configuration defining proxy rules, chunk splitting, and plugin setup for the RAGFlow frontend.

Description

The vite.config.ts file configures the Vite build tool with: development server proxy rules (API and static asset proxying to backend), manual chunk splitting for optimized bundle sizes (separating vendor libraries into named chunks), SVG sprite plugin, React plugin, and path alias configuration.

Usage

This file is consumed by the Vite build process. Modify it when changing proxy targets, adding build plugins, or adjusting chunk splitting strategy.

Code Reference

Source Location

Signature

export default defineConfig({
  plugins: [react(), svgSprite()],
  resolve: { alias: { '@': '/src' } },
  server: {
    proxy: {
      '/api': { target: 'http://localhost:9380' },
      '/v1': { target: 'http://localhost:9380' },
    },
  },
  build: {
    rollupOptions: {
      output: { manualChunks: { ... } },
    },
  },
});

Import

# Consumed by Vite CLI, not imported in code
npx vite         # Development server
npx vite build   # Production build

I/O Contract

Inputs

Name Type Required Description
Build configuration; consumed by Vite CLI

Outputs

Name Type Description
dist/ directory Production build output

Usage Examples

cd web
npm run dev    # Start Vite dev server with proxy
npm run build  # Build for production with chunk splitting

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment