loganfsmyth / babel-plugin-transform-decorators-legacy

A plugin for Babel 6 that (mostly) replicates the old decorator behavior from Babel 5
MIT License
817 stars 57 forks source link

Clarify what babel's `legacy: true` is for exactly #85

Closed catamphetamine closed 5 years ago

catamphetamine commented 5 years ago

The docs say:

in your Babel configuration. Note that legacy: true is specifically needed if you want to get the same behavior as transform-decorators-legacy because there are newer versions of the decorator specification coming out, and they do not behave the same way as this plugin does.

It's still not clear what's the difference between legacy: true mode and the normal mode exactly: which types of use cases are removed from the spec, what are the breaking changes, etc. I have created the same issue in Babel's repo.

catamphetamine commented 5 years ago

The plugin author has posted a link to a blog describing what legacy: true is for and when to use it. https://github.com/babel/babel/issues/10234