1.2.0 • Published 7 years ago

webpack-promise v1.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

weebpack-promise

Webpack as a Promise

Usage

import webpack from "webpack-promise";

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

Error Handling

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 */
});