by Alessio Pelliccione

Some days ago at work, I was writing a small dynamic script to trigger a build for a single file. While doing that, I suddenly wondered: how do modern build tools actually work under the hood?

That question led me to start building a minimal engine — something simple enough to grasp the core idea, but realistic enough to mirror how tools like esbuild or Vite handle rebuilds internally, deciding what to rebuild.

Let’s see the process step by step — from file watching to dependency graph validation — to see what really happens when you hit “Save”.


What’s actually happening under the hood

When you hit “Save”, your dev server doesn’t rebuild the whole project.

Instead, it follows a smart and very fast chain of steps:

  1. The file watcher f…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help