Fork me on GitHub
#figwheel-main
<
2020-03-02
>
cch118:03:55

Are there known issues with figwheel-main and loading of data_readers.cljc? I’m seeing figwheel trying to process this special file upon load and of course the symbols do not resolve to any existing vars. Here is data_readers.cljc

{myco/lit myco.lit/read}
And here is what figwheel-main tells me:
No such namespace: myco, could not locate myco.cljs, myco.cljc, or JavaScript source providing "myco"
followed by further errors about using an undeclared var.

Jan K21:03:48

@cch1 I also had this problem. I think it should start working if you launch figwheel-main via the scripting API (ie. figwheel.main.api/start) directly from your REPL, where the required namespaces will already be loaded before figwheel starts.

cch121:03:33

Thanks, @jkr.sw. First step is realizing one is not crazy. A nice solution can come later. For me, launching via the scripting API is not ideal. I was hoping to find an option to omit loading a file (not *re*loading) but I can’t find such a thing.

cch121:03:06

(my guess is that figwheel is sending data_readers.cljc to the repl to be evaluated because it is in the “no namespace” category that might be the default before switching to cljs.user)

Jan K21:03:27

I'm not sure what exactly is happening, but I'm happy there's a way to make it work with figwheel, since for example shadow-cljs explicitly doesn't support data_readersat all (https://github.com/thheller/shadow-cljs/issues/272 )

👍 1
kkruit21:03:44

Is there a way to configure figwheel/clj to build js files not at a root in public eg http://localhost/myapp/index.html , http://localhost/myapp/main.js ect.

kkruit21:03:39

is it just a matter of changing your :output-to and :output-dir?

kkruit22:03:50

looks like yes in combination with :asset-path. thanks!