Open dantman opened 4 years ago
Agreed it should have better error handling/messages. Any PRs addressing that will be welcome.
Using the compiler API (instead of the CLI) gives you better options for example to pass the AST directly (where you can use babel to understand ES2015 or newer). Another approach worth using is https://github.com/rxaviers/globalize-webpack-plugin/ (that will handle exactly that for you).
Thanks
I'm using create react app so the latter is not an option.
The errors generated by globalize-compiler are pretty cryptic and not useful when it fails to parse a file.
time.js
Gives the following result:
In this example it's clear that globalize-compiler doesn't support ES20153. But It doesn't tell you what file the failure is. And if the error was somewhere in the middle of the file it wouldn't necessarily be easy to discover what the issue is.