Conversation
|
Maybe we should call an option "es2015=true", consistent with es2015 presets in babel, etc. Other than that, this addition makes sense. I have a feeling it's not very impactful due to gzip, and possibly even worse, but we'd need to see benchmarks for that. /cc @hzoo |
|
Yeah I'm not sure about Future thoughts: would be better to target a specific feature though (not sure how it would work). An integration with babel-preset-env would be pretty great then since we could pass down the data regarding TaggedTemplate support -> this plugin to turn it on or not. Kind of like how we do https://github.com/babel/babel-preset-env/blob/master/src/index.js#L210 It really feels like it makes more sense to have something that combined babel-preset-env + babili together and probably with a bundler like webpack.. |
|
Oh. Yeah. I'll change it to use the preset-env data and implement option as |
|
Maybe I'm missing something, but is this proposed transform sound? |
|
@kzc Good catch. I forgot about that. Thanks! Closing this. Will try other ES2015+ transformations with the options discussed above. |
simplify.callsToTagsecmaVersion(Default = 2015) to preset - now passed only to simplify. Can be used for other transformations laterShould we have this in some other plugin ? It can be present anywhere - nothing related to simplify (considering simplify already has too many transformations)