Files
zui/frontend/vite.config.ts
dtoro b3c2c6711f feat: add node help system and registry for extensible node types
- Implemented a help system for different node types (config, render, variable, function) with detailed usage instructions.
- Created a node registry to manage node types, including registration, retrieval, and validation of connections between nodes.
- Defined central node and edge types for the application to streamline state management.
- Added Nunjucks autocomplete functionality to enhance user experience in template editing.
- Developed a syntax highlighting parser for PlantUML and Nunjucks within the CodeMirror editor.
- Registered built-in node types at application startup, including their default configurations and help entries.
- Introduced a theme context provider to manage light/dark mode preferences across the application.
- Created utility functions for class name management using clsx and tailwind-merge.
- Set up Tailwind CSS for styling with custom themes and responsive design.
- Configured Vite for development with proxy settings for backend API calls and Kroki diagram service.
2026-03-09 20:04:31 +01:00

44 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
server: {
proxy: {
// Backend API (dev): proxy to avoid CORS
'/api/todos': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/api/todos/': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/health': {
target: 'http://localhost:8080',
changeOrigin: true,
},
// Kroki diagram service
'/api/kroki': {
target: 'https://kroki.io',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/kroki/, ''),
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
// Ensure PostCSS/Vite can resolve the shadcn tailwind CSS file
'shadcn/dist/tailwind.css': path.resolve(
__dirname,
'node_modules/shadcn/dist/tailwind.css'
),
// Optional: map the package to its dist for other imports
shadcn: path.resolve(__dirname, 'node_modules/shadcn/dist'),
}
}
})