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

Repetitive code in each module #49

Closed
jeron-diovis opened this issue Sep 30, 2016 · 5 comments
Closed

Repetitive code in each module #49

jeron-diovis opened this issue Sep 30, 2016 · 5 comments

Comments

@jeron-diovis
Copy link

Is there any chance that this transform will be smart enough to keep it's code in separate module, like "transform-runtime" does?

Of course, it's not necessary to joyfully use it – just to be, you know, and ideal tool =)

@loganfsmyth
Copy link
Owner

It's a tough one to solve since Babel doesn't currently provide a way to do this easily. It is something I'm keeping in mind for the future though. For now, I'd hope that by the time the file is gzipped, the difference in size wouldn't be super noticeable.

@loganfsmyth
Copy link
Owner

We're planning to move this into Babel as babel-plugin-transform-decorators in Babel 7.x, which will mean this code will end up in babel-runtime like the other code Babel stuff, so closing this.

@jharris4
Copy link

Just noticed the duplication of the code myself. Any word on babel-plugin-transform-decorators in Babel 7.x?

@jharris4
Copy link

Looks like it might actually be a part of Babel 7 now?

https://www.npmjs.com/package/babel-plugin-transform-decorators

https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-decorators

I guess we could switch to that if we're willing to move to Babel 7?

@blikblum
Copy link

Hi,

@loganfsmyth

I noticed that babel-plugin-proposal-decorators migrated the helpers to babel-helpers in babel/babel#7017

Any chance this can be done to the legacy also?

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

4 participants