Fork me on GitHub
#figwheel-main
<
2018-07-31
>
euccastro00:07:18

if I want to use clojurescript in a non-SPA web page and serve the compiled JS in a page that is not / (e.g., /edit/example), what configuration is recommended so :optimizations :none works? my problem is that when trying to load goog.js et al, I get requests in the browser trying to load (note the spurious edit/ there) I could get it working by setting :asset-path to ../cljs-out/dev, but I don't suppose that's the recommended setup?

hoppy01:07:06

trying to switch to figwheel-main after upgrading cider to something contemporary. keep getting this, little stuck....

hoppy01:07:08

Caused by java.io.FileNotFoundException Could not locate cljs/cli__init.class or cljs/cli.clj on classpath.

bhauman11:07:39

@hoppy you need to have a newer version of ClojureScript

bhauman11:07:07

@euccastro setting the asset-path is exactly what you need here. YOu could probably also set it to /cljs-out/dev

bhauman11:07:31

in fact maybe figwheel-main should be dong that

hoppy11:07:02

@bhauman - thanks, probably getting to be time but it will likely be a war...

euccastro18:07:19

@bhauman: when I tried to do that the browser somehow attempted to fetch http://cljs-out/dev. I guess I'll try [P.S.: it worked just fine!]. A bit weird to duplicate the dev port there but IIUC it's only used for :optimizations :none so meh..

euccastro18:07:08

but yeah, I realized an absolute path will probably work best for me going forward