Skip to content
Latchkey

Loader (webpack) - CI/CD Glossary Definition

A webpack loader transforms a matched file into a module during the build, for example compiling TypeScript or inlining images.

A loader in webpack is a transform applied to a file as it is imported, turning non-JavaScript files (CSS, images, TypeScript) into modules webpack can include. Loaders are chained and configured under module.rules.

Loaders run per file as webpack resolves imports, so ts-loader compiles TypeScript and css-loader turns stylesheets into modules. They differ from plugins, which act on the whole build. In CI, a misconfigured loader is a frequent cause of build failures.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →