X

Sections

Get StartedContribute

Other Options

Edit this Page  
todo
These are all the other options that might not need an entire page. Either we need to create new pages for them, move them to an existing page, or keep an Other Options section like this and replace this TODO with a short description/lead-in paragraph.

bail

boolean

Fail out on the first error instead of tolerating it. By default webpack will log these errors in red in the terminal, as well as the browser console when using HMR, but continue bundling. Turning it on:

bail: true

will force webpack to exit it's bundling process.

warning
Note that this will become the default behavior in webpack 2.x

profile

boolean

Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.

tip
Use the StatsPlugin for more control over the generated profile.

cache

boolean object

Cache the generated webpack modules and chunks to improve build speed. Caching is enabled by default while in watch mode. To disable caching simply pass:

cache: false

If an object is passed, webpack will use this object for caching. Keeping a reference to this object will allow one to share the same cache between compiler calls:

let SharedCache = {};

export default {
  ...,
  cache: SharedCache
}
warning
Don't share the cache between calls with different options. ?> Elaborate on the warning and example - calls with different configuration options?

debug

boolean

Switch all loaders into debug mode to get more verbose feedback. This defaults to false to prevent unnecessary logging but can be easily turned on:

debug: true
todo
Consider adding an example of a certain loader emitting more details.

amd

object

Set the value of require.amd or define.amd:

amd: {
  jQuery: true
}
todo
I don't think this is very clear, at least not without a link pointing to what this might be used for.

loader

object

Expose custom values into the loader context.

todo
Add an example...

recordsPath

Description...

todo
Add example and description as well as details on recordsInputPath and recordsOutputPath.

Contributors:

Contributor to this pageContributor to this page