From 31b6c696d2aeeba6e15c185f34fef093c0eff49a Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Fri, 30 Jul 2021 22:54:48 +0800 Subject: [PATCH] chore: add prune step --- .github/workflows/deploy-dev.yml | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index c51b193d2..812d8854e 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -33,3 +33,9 @@ jobs: - name: Build run: pnpm -- lerna run build --stream + + # See warning in https://pnpm.io/cli/prune + - name: Prune + run: rm -rf node_modules packages/*/node_modules && pnpm i + env: + NODE_ENV: production diff --git a/package.json b/package.json index 50cd66b3e..21ced37c2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "preinstall": "npx only-allow pnpm", "lerna": "lerna", "bootstrap": "lerna bootstrap", - "prepare": "husky install && lerna run --stream prepack", + "prepare": "if test \"$NODE_ENV\" != \"production\" ; then husky install && lerna run --stream prepack ; fi", "dev": "lerna run --parallel dev" }, "devDependencies": {