mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-30 23:06:10 +03:00
Display webpack errors if present in elm-pages build.
This commit is contained in:
parent
18687b8432
commit
f8168edd69
@ -35,7 +35,19 @@ function start({ routes }) {
|
||||
}
|
||||
|
||||
function run({ routes }) {
|
||||
webpack(webpackOptions(false, routes)).run();
|
||||
webpack(webpackOptions(false, routes)).run((err, stats) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(
|
||||
stats.toString({
|
||||
chunks: false, // Makes the build much quieter
|
||||
colors: true // Shows colors in the console
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function webpackOptions(production, routes) {
|
||||
@ -139,6 +151,17 @@ function webpackOptions(production, routes) {
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
stats: {
|
||||
// copied from `'minimal'`
|
||||
all: false,
|
||||
modules: true,
|
||||
maxModules: 0,
|
||||
errors: true,
|
||||
warnings: true,
|
||||
// our additional options
|
||||
moduleTrace: true,
|
||||
errorDetails: true
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user