diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 9ed147b..eadd295 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -28,7 +28,8 @@ COPY package*.json ./ RUN npm config set registry https://registry.npmmirror.com # 安装所有依赖(包括开发依赖,跳过husky) -RUN npm install --silent --ignore-scripts +# 注意:NODE_ENV=production 会跳过 devDependencies,所以用 --include=dev +RUN npm install --silent --ignore-scripts --include=dev # 复制源代码 COPY . .