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

Webpack Loader API Support

Ahmad Amireh edited this page Mar 27, 2016 · 13 revisions

Compatible loader features:

  • this.emitWarning
  • this.emitError
  • this.addDependency
  • this.addContextDependency
  • this.clearDependencies
  • this.callback style for yielding code + map
  • async this.callback style for yielding code + map
  • synchronous return style for yielding code
  • pitch loaders
  • this.cacheable (no op, we're always caching)
  • this.exec (??)
  • this.resolve
  • this.resolveSync

Loader context:

  • this.context
  • this.query
  • this.resourcePath
  • this.resourceQuery
  • this.options (somewhat working, we don't serialize the plugins though or anything with cyclic dependencies)
  • this.data (pitch)
  • this.loaders
  • this.loaderIndex
  • this.values
  • this.inputValues
  • this.debug
  • this.minimize
  • this.sourceMap
  • this.target
  • this.webpack
  • this._compilation
  • this._compiler

Striked out stuff won't be done.

Clone this wiki locally