devongovett / unplugin-parcel-macros

MIT License
204 stars 3 forks source link

exporting macro return values #9

Open PookMook opened 1 month ago

PookMook commented 1 month ago

Hey there, Awesome work on macros and thanks for letting us use it outside of parcel. So far building with them has been a blast.

I do encounter a small hiccup when importing an output of a macros from another file. I get kicked by the could not statically evaluate macro argument message

https://github.com/PookMook/boomer-css/blob/c02ec0157228f886cd71852b80e025e770774c37/src/app/page.tsx <= this works nicely (the css creation is really really bad, but you know, proof of concept) https://github.com/PookMook/boomer-css/blob/c02ec0157228f886cd71852b80e025e770774c37/src/styles/boomer.config.ts but If I extract to a different file, it can't operate anymore.

Is there a workaround or is this intended to be limited to same file/scope macro?

Cheers