Suggest an editImprove this articleRefine the answer for “What task do plugins perform in Webpack?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Plugins in Webpack** are responsible for extending the build's functionality: while `loaders` transform individual files, `plugins` intervene in the whole build process. **Key point:** plugins are a mechanism that controls the build and improves its result by adding automation, optimization, and functionality beyond ordinary file processing.Shown above the full answer for quick recall.Answer (EN)Image**Plugins in Webpack** are responsible for **extending the build's functionality**. While `loaders` transform individual files, `plugins` intervene in the **whole build process** and allow broader tasks that loaders alone cannot solve. ## Main tasks of plugins - optimizing the final files (minification, code splitting, caching) - automating actions (for example, generating HTML, copying assets) - working with the environment (environment variables, cleaning old builds) - integrating third-party tools (PostCSS, ESLint, TypeScript, and others) ## Examples of popular plugins | Plugin | Task | |---|---| | `HtmlWebpackPlugin` | Generates `index.html` and connects the bundles to it | | `CleanWebpackPlugin` | Cleans the `dist` folder before a new build | | `MiniCssExtractPlugin` | Extracts CSS into a separate file | | `DefinePlugin` | Adds environment variables (`process.env.*`) | ## Briefly Plugins are a **mechanism that controls the build and improves its result**, adding extra automation, optimization, and functionality beyond ordinary file processing.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.