2 ms·
I've only recently learned about Babel Plugin Macros and haven't used it in production - but here are a few links in case anyone's interested. https://babeljs.
by lioeters 7y ago
I've only recently learned about Babel Plugin Macros and haven't used it in production - but here are a few links in case anyone's interested.
https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros https://babeljs.io/blog/2017/09/11/zero-config-with-babel-ma...
https://github.com/kentcdodds/babel-plugin-macros https://github.com/kentcdodds/babel-plugin-macros
https://github.com/jgierer12/awesome-babel-macros https://github.com/jgierer12/awesome-babel-macros
These "macros" take a different approach than Sweet.js: they're not syntax extensions, but rather code transformers that you import and use explicitly.