From 9b23442b1ca919507bc7467803bb2d3f5735308a Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Wed, 12 Jun 2024 11:59:00 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20yarn=20v4=20requires=20prepack=20instead?= =?UTF-8?q?=20of=20prepare=20script=20when=20building=E2=80=A6=20(#7371)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What the title says. After the migration to yarn v4, needed a prepack script/action instead of a prepare step. --- package.json | 3 ++- scripts/prepack.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 scripts/prepack.sh diff --git a/package.json b/package.json index 506d4a6e25..c28c02bdbe 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "seed:serve": "UNLEASH_DATABASE_NAME=unleash_test UNLEASH_DATABASE_SCHEMA=seed yarn run start:dev", "clean": "del-cli --force dist", "preversion": "./scripts/check-release.sh", - "heroku-postbuild": "cd frontend && yarn && yarn build" + "heroku-postbuild": "cd frontend && yarn && yarn build", + "prepack": "./scripts/prepack.sh" }, "jest-junit": { "suiteName": "Unleash Unit Tests", diff --git a/scripts/prepack.sh b/scripts/prepack.sh new file mode 100755 index 0000000000..ea4839513b --- /dev/null +++ b/scripts/prepack.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +yarn --cwd ./frontend install && if [ ! -d ./dist ]; then yarn build; fi