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

Reload files where resource path doesn't match web url path #102

Closed
pesterhazy opened this issue Nov 14, 2016 · 3 comments
Closed

Reload files where resource path doesn't match web url path #102

pesterhazy opened this issue Nov 14, 2016 · 3 comments

Comments

@pesterhazy
Copy link
Contributor

I've seen a few issues related to this but wanted to explain the problem again, with the hope of finding an elegant solution.

Consider this common scenario:

  • clojure (ring?) serves /public from java resources. E.g. /public/css/style.css is served at /css/style.css. The idea is that all public assets are located in a single resource directory.
  • you want to expose files to the public if, and only if, they're in /public
  • your boot-cljs configuration is located at public/js/app.cljs.edn

In this scenario, boot-reload tries to load /public/js/app.js, but the files is actually (and properly) served as /js/app.js. If I understand the code, :cljs-asset-path doesn't work here because it will only prepend a string to the path, not change it.

Is my assumption correct that boot-reload doesn't cover this scenario? If so, what would be required to add support?

@Deraen
Copy link
Contributor

Deraen commented Nov 14, 2016

Use asset-path instead of cljs-asset-path.

@darkleaf
Copy link

@pesterhazy
Copy link
Contributor Author

:asset-path works for me, yes. Thanks!

I guess I was confused by the naming/docs, but then this was a dupe of #99

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

3 participants