Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stefanwimmer128/webpack-promise

Webpack as a Promise
https://github.com/stefanwimmer128/webpack-promise

Last synced: 2 days ago
JSON representation

Webpack as a Promise

Awesome Lists containing this project

README

        

# webpack-promise

Webpack as a Promise

## Usage

``` javascript
import webpack from "webpack-promise";

webpack({
/* webpack config */
}, {
/* other options, defaults */
log: true, /* log results */
stats: {
/* options for stats.toString() */
colors: true,
},
});
```

## Error Handling

``` javascript
webpack(/* see usage */).catch(function (err)
{
if (err.err())
/* runtime error */
else if (err.stats().hasErrors())
/* compilation error */
else if (err.stats().hasWarnings())
/* compilation warning */
/* see webpack api for details */
});
```