k-l-lambda commited on
Commit
24fb85f
·
1 Parent(s): 48e90b4

Use npm run build:prod instead of npx vite build

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. trigo-web/app/package.json +1 -0
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM node:20-slim
3
  # Set noninteractive installation
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # Build timestamp to force cache invalidation: 2026-01-12T18:30
7
 
8
  # Install build dependencies
9
  RUN apt-get update && apt-get install -y \
@@ -31,8 +31,8 @@ RUN npm install --omit=dev && \
31
  # Build jison parsers (required for the game) - use global tsx directly
32
  RUN tsx tools/buildJisonParser.ts
33
 
34
- # Build frontend (generates dist folder) - skip vue-tsc type checking, build only
35
- RUN cd app && npx vite build --mode production
36
 
37
  # Build backend with esbuild (handles ESM imports without .js extensions)
38
  RUN esbuild backend/src/server.ts --bundle --platform=node --target=node20 --format=esm --outfile=backend/dist/server.js --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
 
3
  # Set noninteractive installation
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Build timestamp to force cache invalidation: 2026-01-12T18:35
7
 
8
  # Install build dependencies
9
  RUN apt-get update && apt-get install -y \
 
31
  # Build jison parsers (required for the game) - use global tsx directly
32
  RUN tsx tools/buildJisonParser.ts
33
 
34
+ # Build frontend (generates dist folder) - skip vue-tsc type checking, use build:prod
35
+ RUN cd app && npm run build:prod
36
 
37
  # Build backend with esbuild (handles ESM imports without .js extensions)
38
  RUN esbuild backend/src/server.ts --bundle --platform=node --target=node20 --format=esm --outfile=backend/dist/server.js --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
trigo-web/app/package.json CHANGED
@@ -7,6 +7,7 @@
7
  "dev": "vite",
8
  "dev:host": "vite --host",
9
  "build": "vue-tsc --noEmit && vite build",
 
10
  "preview": "vite preview"
11
  },
12
  "dependencies": {
 
7
  "dev": "vite",
8
  "dev:host": "vite --host",
9
  "build": "vue-tsc --noEmit && vite build",
10
+ "build:prod": "vite build",
11
  "preview": "vite preview"
12
  },
13
  "dependencies": {