ef4 / ember-browserify

ember-cli addon for easily loading CommonJS packages from npm via browserify.
MIT License
172 stars 28 forks source link

Changing error message on invalid syntax #117

Closed mjstevens777 closed 7 years ago

mjstevens777 commented 7 years ago

I noticed a bug when a file has invalid syntax. Ember-browserify throws the error Error parsing code while looking for "npm:" imports: <Error Message> but does not include a file path. I tracked it down to a simple precedence bug. After the fix the error message is correctly Error parsing code while looking for "npm:" imports: <Error Message> in file: <Path>

For my particular setup this means that I have to search through all of the files in the repo looking for a syntax error because the only error I get during the build is from the browserify plugin, so this can be an important issue.

As a side note - this bug also exists in both outstanding PRs and will cause merge conflicts with both of them.