- Extract types to types/database.ts - Create composables: useDatabaseApi, useDataTable, useQueryExecutor - Create components: DatabaseSidebar, DataTable, FilterBar, SchemaInfo, QueryEditor, QueryColumnsBar, DatabaseStats, TablePagination - Add horizontal scroll to DataTable with sticky checkbox column - Configure @ path alias in vite and tsconfig - Reduce DatabasePage.vue from 1548 to 314 lines
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
// Habilitar compilación de templates en runtime para componentes dinámicos
|
|
'vue': 'vue/dist/vue.esm-bundler.js'
|
|
}
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.ico', 'icons/*.png'],
|
|
manifest: {
|
|
name: 'Agent UI - Dynamic Canvas',
|
|
short_name: 'AgentUI',
|
|
description: 'Dynamic canvas for Claude Code interaction',
|
|
theme_color: '#1a1a2e',
|
|
background_color: '#1a1a2e',
|
|
display: 'standalone',
|
|
icons: [
|
|
{
|
|
src: 'icons/icon-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'icons/icon-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
server: {
|
|
port: 4100,
|
|
host: true,
|
|
proxy: {
|
|
'/api': 'http://localhost:4101'
|
|
},
|
|
watch: {
|
|
usePolling: false
|
|
}
|
|
},
|
|
build: {
|
|
sourcemap: true
|
|
}
|
|
})
|