Posted by preyneyv 10/28/2024
Compile-time code generation using directives. Transformers combined with transforms. A workflow like never before.
(/s) ---
It works by using a custom plugin to transform the AST and substitute function bodies with generated code. More info on the GitHub readme.
GitHub: https://github.com/preyneyv/swc-plugin-use-prompt Demo: https://codesandbox.io/p/devbox/swc-plugin-use-prompt-m73dsf...
If not... Yikes.
really fun to build though