Home > Q&A > body text
I also want to use this error message for my own configured webpack. How to do it?
ringa_lee2017-05-19 10:35:17
http://webpack.github.io/docs...
1
2
3
4
5
6
7
8
9
10
<code>var webpack = require("webpack");
<code>
var
webpack =
require
(
"webpack"
);
webpack({
// configuration
}, function(err, stats) {
},
function
(err, stats) {
if (err) { throw new gutil.PluginError('webpack:build', err); }
if
(err) {
throw
new
gutil.PluginError(
'webpack:build'
, err); }
gutil.log('[webpack:build]', stats.toString({
gutil.log(
'[webpack:build]'
, stats.toString({
chunks: false, // Makes the build much quieter
chunks: false,
// Makes the build much quieter
colors: true
}));
});</code>