Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/stefanwimmer128/webpack-promise
- Owner: stefanwimmer128
- Created: 2017-09-06T10:44:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-26T13:48:42.000Z (about 7 years ago)
- Last Synced: 2024-12-11T01:29:05.003Z (28 days ago)
- Language: JavaScript
- Homepage: https://yarn.pm/webpack-promise
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 */
});
```