jeffbski / joi-browser

joi validation bundled for the browser (deprecated) - use joi@16+
Other
273 stars 39 forks source link

Why "joi-browser" is not bundled with Joi to browser targets??? #8

Open TCMiranda opened 8 years ago

TCMiranda commented 8 years ago

It seems so wrong that a complete, well maintained, framework-agnostic library like Joi does not aim to have a global support on the Javascript environment.

The community is trying to rally to get the Joi package itself setup so that we can generate bundles directly from it, but until this is done, this package will allow you to build a bundled version.

You should merge the webpack script into Joi. I can't see where are the troubles. As it removes unsupported features, it is ok merge it and improve the browser support progressively.

Sorry for posting this like an issue, but it seems right since both repositories could me mentioned here. https://github.com/hapijs/joi/issues/528

Anyway, thanks for the support!

Marsup commented 8 years ago

Because while it works well for some people and I thank @jeffbski for making it, I disagree with the philosophy of this ecosystem. https://github.com/hapijs/joi/issues/944

That is unless you have a magical solution that solves my problem with the sad state of bundlers...

TCMiranda commented 8 years ago

Yea, I get your opinion. It just disappointing

@Marsup As the maintainer of such useful tool like Joi, you should sometimes put aside that philosophy in favor of the community. We all know the state of JS and the bundling systems are a mess, but it wont magically solve itself.

The best way I know to deal with it is https://github.com/defunctzombie/package-browser-field-spec It is also the most feasible spec to use.

Just put the webpack script inside the project and publish it to npm with the browser atribute pointing to the compiled source.

The quote that I mentioned above has six months old now... It is time to solve it already

Thanks!

shai32 commented 6 years ago

@Marsup please consider adding it.