Open alidcast opened 1 year ago
Macros are currently running in SCI and should be required like so:
(:require-macros [macros :refer [$]])
The macros.cljc
file should be in src/macros.cljc
.
You may have gotten the example from an old version of cherry, where you could import .mjs
but this is no longer the case since cherry works on both the JVM and JS so code has to run in the host and this is currently done using SCI.
Could you tell me where you found the other example, so we can update it?
does this relate to issue about loading namespaces/deps? https://github.com/squint-cljs/cherry/issues/64
This example should be updated. I'll keep this issue open so I can do that.
Can be seeing running React example
npx cherry run react/index.cljs
Seems to trip up when handling the local import
(:require-macros ["./macros.mjs" :refer [$]])
I'm not sure what the status of macros are, but I was giving them a go before trying to import a library that used them, and ran into above issue.