hawkins / prettier-webpack-plugin

Process your Webpack dependencies with Prettier
https://travis-ci.org/hawkins/prettier-webpack-plugin
50 stars 14 forks source link

Crashes on syntax errors #3

Closed hawkins closed 7 years ago

hawkins commented 7 years ago

Currently, prettier.format returns an error when invalid syntax is parsed. This crashes the plugin.

Fixing this should be as simple as adding a try-catch around that block.

It would be great if we could optionally specify a flag, such as warn: True that will use console.warn to warn the user of compilation errors too, instead of just silently failing.

hawkins commented 7 years ago

Looks like this is indeed fixed now. Sweet! 🥇 @esganzerla