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