webpack-promise

1.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-promise

Weekly Downloads

7

Version

1.2.0

License

ISC

Last publish

Collaborators

  • stefanwimmer128