jedireza / hapi-react-views

:package: A hapi view engine for React components
MIT License
231 stars 33 forks source link

Dont include transpiler #30

Closed jedireza closed 9 years ago

jedireza commented 9 years ago

Including node-jsx never sat well with me and since some people have asked if we could replace it with babel, I started looking into that.

The Babel docs say:

Not suitable for libraries

The require hook automatically hooks itself into all node requires. This will pollute the global scope and introduce conflicts. If you're writing an application, it's completely fine to use. If, however, you're writing a library then you should compile your library and depend on the babel-runtime.

Source: https://babeljs.io/docs/usage/require/

And this makes sense. We should be generic enough and let people choose their own transpilers and that decision should live in their application.