This repository was archived by the owner on Mar 22, 2019. It is now read-only.
forked from webpack/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
list of loaders
Andrey Sitnik edited this page Aug 24, 2014
·
179 revisions
-
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: ExtractsourceMappingURLcomments from modules and offer it to webpack -
checksum: Computes the checksum of a file -
null: Emits an empty module.
-
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. -
bundle: Wraps request in arequire.ensureblock (callback) -
promise: Wraps request in arequire.ensureblock (promise) -
react-proxy: Code Splitting for react components. -
react-hot: Allows to live-edit React components while keeping them mounted and preserving their state.
-
coffee: Loads coffee-script like JavaScript -
coffee-redux: Loads coffee-script like JavaScript -
json5: Like json, but not so strict. -
es6: Loads ES6 modules. -
regenerator: Use ES6 generators via Facebook's Regenerator module. -
livescript: Loads LiveScript like JavaScript -
sweetjs: Use sweetjs macros. -
traceur: Use future JavaScript features with Traceur.
-
html: Exports HTML as string, require references to static resources. -
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. -
ejs: Loads EJS (underscore( templating engine) template and returns a pre-compiled function -
yml: Converts YAML to JSON -
markdown: Compiles Markdown to HTML
-
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 -
autoprefixer: Add vendor prefixes to CSS rules using values from Can I Use.
-
mocha: do tests with mocha in browser or node.js -
coverjs: PostLoader to code coverage with CoverJs -
jshint: PreLoader for linting code. -
injectable: Allow to inject dependencies into modules -
transform: Use browserify transforms as loader.