fix(docker): pin pnpm@10 + whitelist build scripts (#80)

This commit is contained in:
matevip 2026-05-09 06:53:09 +08:00
parent 52e06afec4
commit 95b7fed6d5
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,11 @@
# build container. These files are later copied into the JAR's classpath so
# Spring Boot serves the SPA at the root URL.
FROM node:22-alpine AS frontend-builder
RUN npm install -g pnpm --silent
# Pin pnpm to a major version so the Docker build doesn't break when the npm
# `latest` tag jumps majors. pnpm v10+ blocks dependency lifecycle scripts by
# default; the allowed packages live under `pnpm.onlyBuiltDependencies` in
# mateclaw-ui/package.json.
RUN npm install -g pnpm@10 --silent
WORKDIR /frontend
# Install dependencies first (layer cache)
COPY mateclaw-ui/package.json mateclaw-ui/pnpm-lock.yaml ./

View File

@ -51,5 +51,11 @@
"typescript": "~5.7.2",
"vite": "^7.3.1",
"vue-tsc": "^3.2.6"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"vue-demi"
]
}
}