diff --git a/Dockerfile b/Dockerfile index 318240fd..b8bb1db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,10 +45,14 @@ COPY frontend/package*.json ./frontend/ # guard keeps NODE_EXTRA_CA_CERTS unset on a clean checkout (no cert), so Node # does not warn about a missing cert path; a proxy-inspected build still gets # the cert because the file is present. +# Force devDependencies in: vite and the rest of the build toolchain live under +# devDependencies, and some base images / proxied environments default npm to +# omit=dev, which leaves `vite: not found` at build time. A build stage always +# needs them, so include them explicitly regardless of the ambient NODE_ENV. RUN if [ -f /usr/local/share/ca-certificates/corp-root-ca.crt ]; then \ export NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/corp-root-ca.crt; \ fi; \ - cd frontend && npm ci + cd frontend && npm ci --include=dev # The frontend keeps its repo-relative layout here, because npm prebuild runs # `node ../scripts/stage-frontend.mjs`, which stages each plugin's frontend/ into