feat: add customer-owned frontend, device config, pricing (v1.2.0)
- Add frontend/ at root (customer's own React app, all pages) - Add customers/tianpu/devices.json (17 devices, 375kW PV) - Add customers/tianpu/pricing.json (Beijing TOU 4-tier) - Add customers/tianpu/hooks/__init__.py - Add .githooks/pre-commit to block core/ modifications - Add CLAUDE.md, .gitignore - Update docker-compose.override.yml frontend -> ./frontend - Pin bcrypt==4.0.1 in requirements.txt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
29
frontend/vite.config.ts
Normal file
29
frontend/vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://backend:8000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
// Force consistent pre-bundling of deps that have CJS/ESM interop issues
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-dom/client',
|
||||
'@react-three/fiber',
|
||||
'@react-three/drei',
|
||||
'@react-three/postprocessing',
|
||||
'three',
|
||||
],
|
||||
// Ensure all deps are processed in a single pass
|
||||
force: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user