Last active
January 13, 2019 10:29
-
-
Save BiosBoy/ec38bcace6319637ec0184bb9adb80a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ----------------------------- | |
| // READING WEBPACK CONFIGURATION | |
| // ----------------------------- | |
| function webpackCompiler() { | |
| return new Promise((resolve, reject) => { | |
| const compiler = webpack(webpackConfig); | |
| compiler.run((err, stats) => { | |
| if (err) { | |
| debug('Webpack compiler encountered a fatal error.', err); | |
| return reject(err); | |
| } | |
| const jsonStats = stats.toJson(); | |
| debug('Webpack compilation is completed.'); | |
| resolve(jsonStats); | |
| }); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment