You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Bun example doesn't work, arguments can only be literal strings, objects and arrays in unplugin-macros.
import{getText}from'./getText.ts'with{type: 'macro' };import{getFoo}from'./getFoo.ts'with{type: 'macro' };exportfunctionhowLong(){// this works because getFoo() is statically knownconstfoo=getFoo();consttext=getText(`https://example.com/${foo}`);console.log("The page is",text.length,"characters long");}
Suggested solution
Support macro functions as arguments. Not sure if the implementation of #12 would solve this.
Clear and concise description of the problem
Currently the Bun example doesn't work, arguments can only be literal strings, objects and arrays in
unplugin-macros
.Suggested solution
Support macro functions as arguments. Not sure if the implementation of #12 would solve this.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: