Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[Feature Request] enable even simpler transformation #4840
Comments
This comment has been minimized.
This comment has been minimized.
We could do that - it only uses prototype in loose mode btw. It would probably be low priority for us since it's not a bug fix or core feature |
This comment has been minimized.
This comment has been minimized.
I could help with some guideline of where to start, if you are interested. |
This comment has been minimized.
This comment has been minimized.
Yeah sure! - you can also join our slack #development #plugins as well slack.babeljs.io I would check our CONTRIBUTING.md, https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md, and test with astexplorer (http://astexplorer.net/#/sskXYR4icD/20) This is going to touch loose mode so there's a loose.js from index.js babel/packages/babel-plugin-transform-es2015-classes/src/loose.js Lines 16 to 17 in b86f618 Looks like that is the place where it's doing a Instead your want to do a one time addition of |
Fix babel#4840: Alias class prototype for methods in loose mode (babel#5560)
Please ignore if this already discussed.
Suppose I have a class like this:
This will be transformed into:
Can we have something like this instead:
Imagine if we have 20 of classes like this, the amount of prototype repeated will be big, not counted the long class names
Can we have it enhanced in this way ?