friendly-errors-webpack-plugin
friendly-errors-webpack-plugin copied to clipboard
Add `Last compile` and `Took` to the output
Hi @geowarin,
I added an option for dateString, took, displayLastCompile and displayTook:
const defaultOutputOptions = {
dateString: {
color: 'blue',
},
took: {
// can be "ms" or "s"
on: 'ms',
// greater than 5000 ms, it will be displayed on red
// (!) if took.on === 's' then took.red must be on seconds too
red: 5000,
},
displayLastCompile: true,
displayTook: true,
};
Could you add a screenshot? 👍
Screenshot with default options:
new FriendlyErrorsPlugin()
Screenshot with custom options:
new FriendlyErrorsPlugin({
output: {
took: {on: 's', red: 5},
}
})
Screenshot for a took < output.took.red
(default to 5000ms):
This is really cool 👌 What I would add to Last compile
however is how long ago the last compile was:
Last compile: 2017-5-28 at 02:47:30 (2 minutes ago)
This is really cool ! I agree with @timneutkens, a time ago information would be useful.
Whenever the tests pass, we'll merge it :)
@timneutkens what do you mean by how long the last compile was ?
2 minutes ago from what ? the first time that you do node run dev
?
@geowarin
Whenever the tests pass, we'll merge it :)
Can you add the tests please ?
I just realized we'd have to clear the terminal for that 😅 maybe not a good idea 😋