jurassix / react-validation-mixin

Simple validation mixin (HoC) for React.
MIT License
283 stars 38 forks source link

Safari/Babel/Webpack Const declarations are not supported in strict mode #71

Closed logandhead closed 8 years ago

logandhead commented 8 years ago

Safari is failing to load my React app with this line:

Const declarations are not supported in strict mode.

This bug occurred after the latest release.

jurassix commented 8 years ago

Seems like a packaging issue. However, since this library is transpiled to ES5 via babel I'm not sure where the problem is. Can you inspect your node_modules folder and search for const. Also, can you provide the file that is erroring?

I just pulled this library into a new package and searched for const, I see results in the README and Test files, but nothing else.

royroev commented 8 years ago

Your library has a relationship with joi. These repositories describe the problem and they propose to use the joi-browser. How to take this into account when import your library - the big question.

jurassix commented 8 years ago

Note investigation would be needed into the joi-validation-strategy since that is the only dependecy on Joi. You can create your own strategy without Joi easily or using joi-browser if you wish.