Loaders

Webpack enables use of loaders to preprocess files. This allows you to bundle any static resource way beyond JavaScript. You can easily write your own loaders using Node.js.

Loaders are activated by using loadername! prefixes in require() statements, or are automatically applied via regex from your webpack configuration – see configuration.

Files

  • val-loader Executes code as module and consider exports as JS code
  • ref-loader Create dependencies between any files manually

JSON

Transpiling

Templating

Styling

Frameworks

Awesome

For more third-party loaders, see the list from awesome-webpack.

9 Contributors

simon04bajrasrhys-vdwEugeneHlushkohemal7735snitin315anshumanvjamesgeorge007chenxsan

You are reading the documentation for webpack 5, the latest release. Read the webpack 4 documentation here. See the migration guide for upgrading to webpack 5.