Fork me on GitHub
#clojurescript
<
2020-01-16
>
jjttjj18:01:03

Is there a way to include an edn file to be read in cljs?

darwin18:01:15

you can have a macro which slurps the content and emits the edn as code

lilactown18:01:10

that will work somewhat, but you run into issues with compiler cache invalidation

darwin18:01:38

that’s a good point

lilactown18:01:40

I don’t think other tooling (i.e. figwheel or clojurescript compiler) has done anything similar to this though

4
darwin18:01:45

unrelated question, shadow-cljs has also support for reading env variables in a safe way, correct?

lilactown18:01:53

I am not sure about that

jjttjj18:01:44

or is it best to just do a def inside a cljs file

lilactown18:01:27

that’s the easiest way