Production JS bundle was a few very long minified lines (first line ~105K, max ~190K). Some JS engines/browsers (notably older Safari/iOS) fail to parse a single minified line that long, throwing 'SyntaxError: 10' at the end of line 1 and showing a white screen even though the asset is served complete and valid (verified: hash matches local, node --check passes, full 564K). Switch to terser minifier with max_line_len=120 so the bundle emits 4,988 short lines (max ~1.9K) instead of ~24 huge lines. Asset hash changes (cache-bust). Frontend 10 tests pass; build OK. Also fix docker-compose port: SPA is now served by nginx on :8080, so map external 3000 -> 8080 (was 3000->3000 pointing at a removed vite dev server).
14 lines
379 B
YAML
14 lines
379 B
YAML
services:
|
|
crowdsight:
|
|
image: ghcr.io/666ghj/crowdsight:latest
|
|
# 加速镜像(如拉取缓慢可替换上方地址)
|
|
# image: ghcr.nju.edu.cn/666ghj/crowdsight:latest
|
|
container_name: crowdsight
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "3000:8080"
|
|
- "5001:5001"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./backend/uploads:/app/backend/uploads |