Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Issues with using Babel #40

Closed
cdeutsch opened this issue May 28, 2015 · 1 comment
Closed

Issues with using Babel #40

cdeutsch opened this issue May 28, 2015 · 1 comment

Comments

@cdeutsch
Copy link

I'm running into an issue with using both Babel and Sugar with io.js which was recently switched to in #29

Repro:
https://github.com/crdeutsch/iojsbabel

My app is requiring sugar way before express-react-views requires babel.

I can require babel before sugar but then express-react-views will cause an error because babel can only be required once.

In addition Babel doesn't recommend using itself in libraries:
https://babeljs.io/docs/usage/require/

Would it make sense to remove all .JSX parsing libraries as a dependency from express-react-views?

Or at least have an option to skip the require call to babel?

@zpao
Copy link
Member

zpao commented May 28, 2015

It would probably make sense to have an option to disable the require hook. It exists in the view layer so that we can clear the cached require, otherwise you wouldn't be able to see changes to views without restarting the whole app (I learned this the hard way when I wrote this thing, that first website sucked to work on).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants