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
Plugin (build) - CI/CD Glossary DefinitionPlugin (build): A build plugin extends a bundler by hooking into the whole build lifecycle rather than a sing…
Transpilation - CI/CD Glossary DefinitionTranspilation: Transpilation converts source code from one language or language version to another at the sam…
Module Resolution - CI/CD Glossary DefinitionModule Resolution: Module resolution is the process a bundler or runtime uses to turn an import specifier (li…