Skip to content

Conversation

@AlessioGr
Copy link
Member

@AlessioGr AlessioGr commented Dec 5, 2025

This PR removes the prepack and prepublishonly scripts, which have become unnecessary and counterproductive.

PR #14820 introduced a new pnpm build:debug command. However, when running our pre-release publish workflow, each package is currently built twice: once via pnpm build:debug (as intended) and again via the hard-coded prepublishonly script. Because prepublishonly always runs a clean, non-debug build, it both nullifies the debug output and adds significant overhead by rebuilding everything.

All of our release and pack-to-destination scripts already perform a full build ahead of time, so these additional prepublish hooks provide no benefit and actively interfere with the intended debug workflow. This PR removes the redundant scripts to ensure debug builds work as expected and to speed up the release process.

Additionally, this PR fixes some issues with the build:debug script:

  • scss was not displayed
  • react dev mode was not enabled
  • enables debug build for @payloadcms/next package

@AlessioGr AlessioGr requested a review from denolfe as a code owner December 5, 2025 22:12
@AlessioGr AlessioGr enabled auto-merge (squash) December 5, 2025 22:13
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@AlessioGr AlessioGr changed the title ci: remove prepack and prepublishonly scripts ci: remove prepack and prepublishonly scripts, fix build:debug issues Dec 5, 2025
@@ -0,0 +1,24 @@
import { mkdirSync, writeFileSync } from 'fs'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is run for build:debug - since we don't have a css bundle there

@AlessioGr AlessioGr merged commit 20914cc into main Dec 8, 2025
94 checks passed
@AlessioGr AlessioGr deleted the ci/remove-pre-scripts branch December 8, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants