fix(frontend): configure pnpm v11 build approvals in workspace file

pnpm v11 no longer supports onlyBuiltDependencies in package.json and does not
accept install-time --allow-build flags. Move build-script approvals to
pnpm-workspace.yaml and copy it before install in Dockerfile so CI Docker builds
can apply allowBuilds during pnpm install.
This commit is contained in:
wizardchen
2026-05-08 16:32:09 +08:00
committed by lyingbug
parent de7a241f8b
commit 86f11d98e8
3 changed files with 6 additions and 8 deletions

View File

@@ -9,11 +9,12 @@ ENV VITE_IS_DOCKER=true
# 复制依赖文件
COPY package*.json ./
COPY pnpm-workspace.yaml ./
COPY packages/xlsx-0.20.2.tgz ./packages/xlsx-0.20.2.tgz
# 安装依赖
RUN corepack enable
RUN pnpm install --allow-build=@vue-office/pptx --allow-build=esbuild --allow-build=vue-demi
RUN pnpm install
# 复制项目文件
COPY . .

View File

@@ -60,12 +60,5 @@
"lightningcss": "none",
"esbuild": "^0.25.0",
"serialize-javascript": "^7.0.3"
},
"pnpm": {
"onlyBuiltDependencies": [
"@vue-office/pptx",
"esbuild",
"vue-demi"
]
}
}

View File

@@ -0,0 +1,4 @@
allowBuilds:
"@vue-office/pptx": true
esbuild: true
vue-demi: true