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

How to handle emit('file') with Babel presets? #173

Closed
mattdesl opened this issue Jan 11, 2016 · 2 comments
Closed

How to handle emit('file') with Babel presets? #173

mattdesl opened this issue Jan 11, 2016 · 2 comments

Comments

@mattdesl
Copy link

I'd like a Babel plugin to be able to emit a new dependency. How can we make this possible with babelify?

For example, I have a plugin that replaces brfs in some ways (with extra features like ES2015 and source maps).

https://github.com/Jam3/babel-plugin-static-fs

But the files will not get picked up by watchify. I can write a new source transform that wraps the above plugin with its own babel-core transform to support the file emitting, but it seems like it would be faster to use a single transform with multiple plugins (es2015, static-fs, etc).

@zertosh
Copy link
Member

zertosh commented Jan 17, 2016

Hmm. What if the browserify instance is passed down as an option? Or if the plugin returned metadata about files that babelify should emit a file event for?

@loganfsmyth
Copy link
Member

I'm triaging old issues on babelify. Since this has been inactive for ages, I'm going to close it. Feel free to re-open if there's still something to discuss, but I'm assuming at this point it's been too long to address in a useful way.

This would be tough. This would need to be added to babel/core first, so either way if we explore this it should happen in https://github.com/babel/babel

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

3 participants