Out of the box, webpack only understands JavaScript and JSON. Loaders let it handle other file types by transforming their contents into modules that webpack can add to the dependency graph. See Concepts: Loaders for how they fit into a build.
The loaders below are maintained by the webpack organization.
| Loader | Description |
|---|---|
sass-loader | Compile Sass and SCSS to CSS |
less-loader | Compile Less to CSS |
stylus-loader | Compile Stylus to CSS |
postcss-loader | Process CSS with PostCSS |
coffee-loader | Compile CoffeeScript to JavaScript |
thread-loader | Run the loaders that follow it in a worker pool |
These loaders are deprecated and their repositories are archived, so they are no longer documented here. Each one lists what to use instead.
| Loader | Use instead |
|---|---|
css-loader | Native CSS |
style-loader | Native CSS |
html-loader | experiments.html |
exports-loader | A small plugin, see the migration recipe |
imports-loader | A small plugin, see the add-imports example |
expose-loader | A small plugin, see the migration recipe |
remark-loader | The markdown example |