Fix frontend build: compile React bundle properly
All checks were successful
Build and Push Frontend / build (push) Successful in 22s

- Build TypeScript/React to JavaScript bundle
- Serve compiled main.js and main.css
- Update HTML to load compiled assets
- Add build step to Dockerfile

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hector Ros
2026-01-20 01:34:38 +01:00
parent 137f1fe110
commit 3fc9b01940
3 changed files with 6 additions and 2 deletions

View File

@@ -11,6 +11,9 @@ RUN bun install --frozen-lockfile --production
# Copy source code # Copy source code
COPY . . COPY . .
# Build the React bundle
RUN bun run build
# Expose port # Expose port
EXPOSE 3001 EXPOSE 3001

View File

@@ -6,7 +6,7 @@
"scripts": { "scripts": {
"dev": "bun --hot server.ts", "dev": "bun --hot server.ts",
"start": "bun server.ts", "start": "bun server.ts",
"build": "bun build public/index.html --outdir ./dist --target browser" "build": "bun build src/main.tsx --outdir ./public/dist --target browser --minify"
}, },
"devDependencies": { "devDependencies": {
"@types/bun": "latest", "@types/bun": "latest",

View File

@@ -4,9 +4,10 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AiWorker - AI Agent Orchestration Platform</title> <title>AiWorker - AI Agent Orchestration Platform</title>
<link rel="stylesheet" href="/dist/main.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="../src/main.tsx"></script> <script type="module" src="/dist/main.js"></script>
</body> </body>
</html> </html>