Skip to content

feat(watch): call build:prepare hook on watch rebuilds - #1104

Open
kanchingyg wants to merge 2 commits into
rolldown:mainfrom
kanchingyg:feat/watch-build-prepare-hook
Open

kanchingyg wants to merge 2 commits into
rolldown:mainfrom
kanchingyg:feat/watch-build-prepare-hook

Conversation

@kanchingyg

Copy link
Copy Markdown

Closes #972

In src/build.ts, hooks.callHook('build:prepare', context) ran once before rolldownWatch started, whereas build:done ran after every rebuild in postBuild().

This change invokes await hooks.callHook('build:prepare', context) on START watcher events when hasBuilt is true so build:prepare runs before each rebuild in watch mode.

@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit dd6ead5
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6adc7683a3df51462df16a15
😎 Deploy Preview https://deploy-preview-1104--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown@1104 -D
npm i https://pkg.pr.new/rolldown/tsdown@1104 -D
yarn add https://pkg.pr.new/rolldown/tsdown@1104.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1104 -D
npm i https://pkg.pr.new/rolldown/tsdown/create-tsdown@1104 -D
yarn add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1104.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1104 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1104 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1104.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1104 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1104 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1104.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1104 -D
npm i https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1104 -D
yarn add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1104.tgz -D

commit: dd6ead5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Call build:prepare hook on rebuild in watch mode

1 participant