Skip to content
This repository was archived by the owner on Mar 22, 2019. It is now read-only.

list of loaders

Andrey Popp edited this page Feb 1, 2015 · 179 revisions

basic

  • json: Loads file as JSON
  • raw: Loads raw content of a file (as utf-8)
  • val: Executes code as module and consider exports as JavaScript code
  • imports: imports stuff to the module
  • exports: exports stuff from the module
  • expose: expose exports from a module to the global context
  • script: Executes a JavaScript file once in global context (like in script tag), requires are not parsed.
  • source-map: Extract sourceMappingURL comments from modules and offer it to webpack
  • checksum: Computes the checksum of a file
  • null: Emits an empty module.
  • cowsay: Emits a module with a cowsay header.
  • dsv: Loads csv/tsv files.

packaging

  • file: Emits the file into the output folder and returns the (relative) url.
  • url: The url loader works like the file loader, but can return a Data Url if the file is smaller than a limit.
  • worker: The worker loader creates a WebWorker for the provided file. The bundling of dependencies of the Worker is transparent.
  • serviceworker: Like the worker loader, but designed for Service Workers.
  • bundle: Wraps request in a require.ensure block (callback)
  • promise: Wraps request in a require.ensure block (promise)
  • react-proxy: Code Splitting for react components.
  • react-hot: Allows to live-edit React components while keeping them mounted and preserving their state.
  • image: Compresses your images. Ideal to use together with file or url.
  • svgo-loader: Compresses SVG images using svgo library
  • baggage: Automatically require any resources related to the required one
  • polymer-loader: Process HTML & CSS with preprocessor of choice and require() Web Components like first-class modules.

dialects

templating

  • html: Exports HTML as string, require references to static resources.
  • riot: Load RiotJS tags and convert them to javascript.
  • jade: Loads jade template and returns a function
  • jade-html: Loads jade template and returns generated HTML
  • template-html: Loads any template with consolidate.js and returns generated HTML
  • handlebars: Loads handlebars template and returns a function
  • dust: Loads dust template and returns a function
  • ractive: Pre-compiles Ractive templates for interactive DOM manipulation
  • jsx: Transform jsx code for React to js code.
  • em: Compiles Emblem to Handlebars.js
  • ejs: Loads EJS (underscore( templating engine) template and returns a pre-compiled function
  • mustache: Pre-compiles Mustache templates with Hogan.js and returns a function
  • yml: Converts YAML to JSON
  • markdown: Compiles Markdown to HTML
  • remarkable: Compiles Markdown to HTML using the Remarkable parser
  • markdown-it: Compiles Markdown to HTML using the markdown-it parser
  • ng-cache: Puts HTML partials in the Angular's $templateCache
  • ngtemplate-loader: Bundles your AngularJS templates and Pre-loads the template cache.
  • hamlc-loader: Compiles haml-coffee templates (.hamlc) and returns a function.

styling

  • bootstrap-sass: Loads a configuration file for Twitter Bootstrap integration using Sass. Allows complete customization via Sass.
  • style: Add exports of a module as style to DOM
  • css: Loads css file with resolved imports and returns css code
  • less: Loads and compiles a less file
  • sass: Loads and compiles a scss file
  • stylus: Loads and compiles a stylus file
  • rework: Post-process CSS with Rework and returns CSS code
  • postcss: Post-process CSS throw Autoprefixer and other PostCSS plugins
  • autoprefixer: Add vendor prefixes to CSS rules using values from Can I Use

translation

  • po: Loads a PO gettext file and returns JSON

support

Clone this wiki locally