DEPRECATED in favour of webpack-build
webpack-service
A high-level wrapper around webpack which:
- Reuses compiler instances to reduce the overhead on multiple requests.
- Provides optional file watchers to detect changes to both your config and source files
- Provides optional caches of the compilation output
- Pre-processes the compilation output so that it can be easily stored or serialized without having to handle the entire source tree
- Provides a config helper to pre-process your config and map the output path to a particular directory
Installation
npm install webpack webpack-service
Usage
var webpackService = ; { // Besides the usual stats data produced by webpack, the service adds extra props: // stats.webpackConfig: the object passed in to webpack // stats.pathsToAssets: an object mapping asset names to the full path of the emitted asset});