Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cljs-asset-path should end up in js file? #97

Closed
arichiardi opened this issue Oct 13, 2016 · 2 comments
Closed

Cljs-asset-path should end up in js file? #97

arichiardi opened this issue Oct 13, 2016 · 2 comments

Comments

@arichiardi
Copy link
Contributor

There is a question mark because I am not sure about this.

We have a serve task serving assets on http://localhost:8000 and therefore our js (even if it is dev) is served from there. We have the following division.cljs.edn in place:

{:require  [division.app]
 :init-fns [division.app/init]
 :compiler-options {:asset-path "/division.out"}}

And I tried to add :cljs-asset-path to the boot-reload compiler options:

:cljs-asset-path "http://localhost:8000"

However the result is, and maybe I am misinterpreting the option:

2016-10-12-200250_678x99_scrot

The only way I could make it work was by intercepting the cljs.edn file(s), and patching them to:

{:require  [division.app]
 :init-fns [division.app/init]
 :compiler-options {:asset-path "http://localhost:8000/division.out"}}

I wonder though if I am doing something wrong or I can improve on this somehow (a PR is included in the list of improvements 😄).

Thanks @Deraen for your work on boot-reload as usual!

@Deraen
Copy link
Contributor

Deraen commented Oct 13, 2016

Boot-reload should load the assets from the same host and port as you have open in browser. You can use asset-host option if you need to change this.

Due to "ClojureScript could not load :main` error", it looks like your application can't load even initially. That error can't be caused by Boot-reload because Boot-reload will only do anything after Cljs app has been successfully evaluated. And boot-reload doesn't affect Clojurescript output at all.

@arichiardi
Copy link
Contributor Author

Sorry, everything you said is true of course and this is more like a boot-cljs issue. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants