systemjs / builder

SystemJS build tool
MIT License
466 stars 122 forks source link

When uglify-js fails to parse, it should throw a more specific Error #835

Open michaelfranzl opened 6 years ago

michaelfranzl commented 6 years ago

https://github.com/systemjs/builder/blob/52ad54cc7714c77b4947269555266f84ab090029/lib/output.js#L80

When uglify-js fails to parse (i.e. when some ES6 module was accidently not configured to be transpiled to ES5), it should not simply re-throw the uglify-js error, since it only contains filename: '0'. The error should contain the currently processed fileName. Ideally, the offending line should be output too.

guybedford commented 6 years ago

Thanks for posting, and apologies for the delay.

I'd be happy to review a PR for this.