Open p2227 opened 8 years ago
I've just seen this project and tried to implement this as babel plugin. Unfortunately this functionality should be implemented in babel-generator instead of plugin.
How babel works: code -> AST ( -> plugins) -> code
. If you want to change AST -> code
behaviour, you should add option to babel-generator, which transform AST into code and create plugin, which enables this option.
Babel is not so much modular as we thought 😞
maybe use it indepent and use the babel-transform in the core because of this
Babel will address this pretty soon, @nolanlawson I think you can close this issue :)
Check here - https://github.com/babel/babel/issues/4615 and this https://github.com/babel/babel/pull/4621
a babal-plugin can parse more es6 code and can be more easy to integrate with gulp/webpack.