Exercise 2: Why Forgetting npm run dev Breaks the Page — Possible Solution ==================================================================== WHY THE PAGE BREAKS ------------------------------ Per this chapter, in development mode, @vite doesn't read a static file at all - it connects to a running Vite dev server on its own specific port, expecting a live process to actually respond. If npm run dev was never started, there is no server listening on that port at all - the connection simply fails, which can show a connection error or prevent any asset (not just CSS) from loading correctly. HOW THIS DIFFERS IN TIMING FROM DJANGO'S DEBUG=False GOTCHA ------------------------------ Per this chapter, Django's own static-file gotcha only appears in production, specifically once DEBUG is flipped to False - it's a problem tied to a deployment-time configuration change, invisible throughout ordinary local development. Laravel's version can happen on literally the very first day of local development, the moment a developer forgets that TWO separate processes (php artisan serve and npm run dev) both need to be running simultaneously - there's no production-specific trigger involved at all; it's purely about whether both required local processes happen to be running right now. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains the mechanism (connecting to a dev server that isn't running), and correctly contrasts the timing - Django's gotcha is production-only and configuration-triggered, while Laravel's can occur immediately in local development if either of two required processes isn't running.