It would be really awesome to be able to add this to the Babel configuration (if we can control it) globally as a plugin. That would allow one to use e.g. the tw prop on JSX Element without having to import "twin.macro" everywhere 馃憤
Not sure how hard that would be to abstract so feel free to close this if a macro is _very_ different from a plugin.
The way I understand it, babel-plugins visit the entire document while babel-plugin-macros visit specific nodes.
At the moment the tw prop part of twin already functions like a babel-plugin _within_ the babel-macro so I'd probably need to adjust that function to allow interop with an external babel-plugin-twin.
I'll have a better look into this and report back.
Most helpful comment
The way I understand it, babel-plugins visit the entire document while babel-plugin-macros visit specific nodes.
At the moment the tw prop part of twin already functions like a babel-plugin _within_ the babel-macro so I'd probably need to adjust that function to allow interop with an external
babel-plugin-twin.I'll have a better look into this and report back.