Spaces:
Sleeping
Sleeping
Commit ·
045a05f
1
Parent(s): e03f122
Add missing main.tsx for Vite build and bump Node version in Dockerfile
Browse files- Dockerfile +1 -1
- frontend/src/main.tsx +10 -0
Dockerfile
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
# ==============================================================
|
| 4 |
|
| 5 |
# Stage 1: Build the React frontend
|
| 6 |
-
FROM node:
|
| 7 |
WORKDIR /app/frontend
|
| 8 |
COPY frontend/package*.json ./
|
| 9 |
# Clean install to ensure all dependencies are properly resolved
|
|
|
|
| 3 |
# ==============================================================
|
| 4 |
|
| 5 |
# Stage 1: Build the React frontend
|
| 6 |
+
FROM node:20-alpine AS frontend-builder
|
| 7 |
WORKDIR /app/frontend
|
| 8 |
COPY frontend/package*.json ./
|
| 9 |
# Clean install to ensure all dependencies are properly resolved
|
frontend/src/main.tsx
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import ReactDOM from 'react-dom/client'
|
| 3 |
+
import App from './App.tsx'
|
| 4 |
+
import './index.css'
|
| 5 |
+
|
| 6 |
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
| 7 |
+
<React.StrictMode>
|
| 8 |
+
<App />
|
| 9 |
+
</React.StrictMode>,
|
| 10 |
+
)
|