From 91073bd498b4f108f6db51ea97da0a401b2b7565 Mon Sep 17 00:00:00 2001 From: tobias Date: Tue, 21 May 2024 12:22:55 +0200 Subject: [PATCH] Generate types before building payload --- payload/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/payload/package.json b/payload/package.json index 34abc92..b9c88e2 100644 --- a/payload/package.json +++ b/payload/package.json @@ -6,9 +6,9 @@ "license": "MIT", "scripts": { "dev": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts nodemon", - "build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js build", + "build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js build ", "build:server": "tsc", - "build": "yarn build:payload && yarn build:server", + "build": "yarn build:payload && yarn generate:types && yarn build:server", "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js node -r tsconfig-paths/register dist/server.js", "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js generate:types", "generate:types:listen": "nodemon --watch src --ext ts --exec 'npm run generate:types'"