3 ms·
I feel the pain. Things got a little bit easier with Babel Plugin Macros and Typescript (which forces you to build macros that adhere to a reasonable type syste
by yuchi 7y ago
I feel the pain. Things got a little bit easier with Babel Plugin Macros and Typescript (which forces you to build macros that adhere to a reasonable type system)
- lioeters 7y agoI'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.