Challenge 1: Loaders vs. Plugins — What Each Operates On — Possible Solution ==================================================================== WHAT A LOADER OPERATES ON ------------------------------ Per this chapter's own css-loader example, a loader operates on INDIVIDUAL FILES as Webpack's own dependency graph processes them. css-loader specifically transforms a single .css file's contents into a form a JavaScript module can consume, which is what makes writing import './styles.css' inside a JS file possible at all — the browser itself has no concept of importing a stylesheet like that; css-loader is what bridges the gap for that one file, every time Webpack encounters a file matching its configured pattern. WHAT A PLUGIN OPERATES ON ------------------------------ Per this chapter's own HtmlWebpackPlugin example, a plugin operates on the BROADER BUILD PROCESS itself, not any single file. HtmlWebpackPlugin doesn't transform any particular source file at all — instead, it hooks into the overall build (specifically, after the bundle has been generated) to automatically produce a new HTML file that references the finished output. It's working at the level of "the whole build just finished, now do something with the result," not "this one file needs to be converted into something else." THE CORE DISTINCTION ------------------------------ A loader's scope is per-file: it runs once for each file matching its configured test pattern, transforming that file's own content. A plugin's scope is the entire build: it can hook in at various stages of the whole process (before bundling starts, after it finishes, etc.) and act on the build as a whole rather than on any specific file's contents. WHY THIS WORKS AS AN ANSWER ------------------------------ It identifies precisely what each mechanism acts on using the chapter's own two named examples (css-loader for per-file transformation, HtmlWebpackPlugin for whole-build-level action), and states the core scope distinction (per-file vs. whole-process) directly rather than describing the two as simply "different kinds of plugins."