Exercise 3: What Changes Between Dev and Production for @vite — Possible Solution ==================================================================== IN DEVELOPMENT (npm run dev RUNNING) ------------------------------ Per this chapter, @vite connects to a live, running Vite dev server process, requesting assets from it directly over that connection - this enables real-time capabilities like hot-reloading, since the dev server can serve freshly-processed assets on demand as source files change. IN PRODUCTION (AFTER npm run build) ------------------------------ Per this chapter, npm run build generates a manifest file (public/build/manifest.json) along with versioned, hashed static asset files - no dev server is running or expected in production at all. @vite reads that manifest directly to determine which actual compiled, hashed file paths to reference, resolving everything from static files on disk rather than a live connection to any running process. THE CORE CHANGE ------------------------------ The fundamental shift is from "ask a live process for this asset" (development) to "look up the correct file path in a pre-generated manifest" (production) - @vite's own behavior automatically adapts based on which of these two states the application is actually in, but the underlying resolution mechanism is genuinely different between the two. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that development relies on a live connection to a running Vite dev server, while production relies on a static manifest file generated in advance by npm run build, with no dev server involved at all - correctly identifying this as a real mechanism switch, not just a configuration flag.