Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babel-core #29

Closed
jamiebuilds opened this issue Jul 2, 2015 · 5 comments
Closed

babel-core #29

jamiebuilds opened this issue Jul 2, 2015 · 5 comments

Comments

@jamiebuilds
Copy link

It'd be nice if you could conditionally load babel-core instead of babel when it exists.

babel-core is the lightweight version of babel that plugins like babelify use.

This should work just as well:

require('babel-core/register')

Ref: gulpjs/gulp#1127

@phated
Copy link
Member

phated commented Jul 2, 2015

@thejameskyle I'm pretty swamped the next couple of weeks. Could you submit a PR that adds it as the first option to .babel.js extension? An example of supporting multiple loaders is the .jsx extension https://github.com/tkellen/js-interpret/blob/master/index.js#L24 (I'm guessing babel-core should be added to that list also)

phated added a commit that referenced this issue Jul 3, 2015
@phated phated closed this as completed in #30 Jul 3, 2015
phated added a commit that referenced this issue Jul 3, 2015
support babel-core - closes #29
@ghost
Copy link

ghost commented Jul 4, 2015

@thejameskyle If I have a project that uses babel-runtime (for generator support, etc.) but also installs the require hook, is it still recommended to add babel-core as a runtime dependency to my project?

In the end, my project ships with babel-runtime regardless, so I was wondering if in this use case it was worth adding yet another dependency babel-core, even if it's "lighter".

@jamiebuilds
Copy link
Author

The babel package uses babel-core internally, if you don't need the CLI I suggest replacing babel with babel-core. babel-runtime is separate

@ghost
Copy link

ghost commented Jul 4, 2015

@thejameskyle My project uses babel-runtime, but it only uses babel in devDependencies, so I could as you say, however:

I am compiling with:

{ optional: ["runtime"] }

So, since babel-runtime it's already there, and everything works fine, I was wondering if adding babel-core would add any value.

@jamiebuilds
Copy link
Author

Go to the support chat, this is isn't the right place to be having this discussion.

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

No branches or pull requests

2 participants