gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

Pretty syntax errors #45

Closed gdborton closed 6 years ago

gdborton commented 6 years ago

A developer on my team spent more time than needed debugging a SyntaxError that was the result of attempting to minify es6 code that snuck into node_modules/. I think that by providing additional context on the failed file, we can help people be more productive.

This change uses babel-code-frame to generate an error message that includes a few lines above/below the encountered SyntaxError.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.5%) to 96.732% when pulling 096b179ce04a755efe279e88568f6760c4ac47b1 on pretty-syntax-errors into 240118c05dc5ce3a85930102778688966ebfe757 on master.