8dc105ff3e
- Delete React files (App.jsx, main.jsx, App.css) - Create modular vanilla JS structure in client/src/: - state.js (global state object) - api.js (all fetch calls) - sse.js (SSE connection management) - ui/auth.js (authentication UI) - ui/downloads.js (downloads rendering) - ui/history.js (history section) - ui/statusPanel.js (status panel) - ui/webhooks.js (webhook management) - ui/filters.js (download client filter) - ui/theme.js (theme switching) - ui/tabs.js (tab navigation) - utils/format.js (formatting utilities) - utils/storage.js (localStorage helpers) - main.js (DOMContentLoaded bootstrap) - Update vite.config.js for vanilla build outputting to ../public/app.js - Build succeeds: 14 modules, 43.88 kB output
29 lines
546 B
JavaScript
29 lines
546 B
JavaScript
// Copyright (c) 2026 Gordon Bolton. MIT License.
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
outDir: '../public',
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
input: {
|
|
main: './src/main.js'
|
|
},
|
|
output: {
|
|
entryFileNames: 'app.js',
|
|
chunkFileNames: '[name].js',
|
|
assetFileNames: '[name][extname]'
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|