refactor: convert SPA to multi-page architecture
- Add scene_onboarding.html, scene_dashboard.html, scene_settings.html - Add onboarding.js, dashboard.js, settings.js scripts - Update vite.config.js for multi-page build - Navigation via window.location.href between pages - Bottom nav bar on dashboard only
This commit is contained in:
26
vite.config.js
Normal file
26
vite.config.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { resolve } from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
root: 'src',
|
||||
build: {
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: resolve(__dirname, 'src/index.html'),
|
||||
onboarding: resolve(__dirname, 'src/pages/scene_onboarding.html'),
|
||||
dashboard: resolve(__dirname, 'src/pages/scene_dashboard.html'),
|
||||
swipe: resolve(__dirname, 'src/pages/scene_swipe.html'),
|
||||
settings: resolve(__dirname, 'src/pages/scene_settings.html'),
|
||||
'ai-classification': resolve(__dirname, 'src/pages/scene_ai_classification.html'),
|
||||
gamification: resolve(__dirname, 'src/pages/scene_gamification.html'),
|
||||
visualization: resolve(__dirname, 'src/pages/scene_visualization.html'),
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
strictPort: true
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user