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

Optimization none output directory #99

Closed
taylorSando opened this issue Sep 17, 2015 · 2 comments
Closed

Optimization none output directory #99

taylorSando opened this issue Sep 17, 2015 · 2 comments

Comments

@taylorSando
Copy link

I have this:

(cljs :optimizations :none :unified-mode true :ids ["js/dev"])

It outputs to /target/js/dev.js
It also creates a /target/js/dev.out directory with all the dev files

Including /js/dev.js in the html file causes these scripts to be created:

<script src="dev.out/goog/base.js"></script>
<script src="dev.out/cljs_deps.js"></script>

Which is great when I'm at the root url, but if I try to use a different url, the dev.out files aren't loaded properly, since it's trying to load them relatively to the url.

@Deraen
Copy link
Member

Deraen commented Sep 17, 2015

In this case you have to manually set :compiler-options :asset-path, probably value "/dev.out/" should work for absolute url.

PS. Unified-mode option doesn't exist anymore.

@taylorSando
Copy link
Author

I changed the the dev.cljs.edn file to this:

{:require [dev.workzone.config]
 :compiler-options {:asset-path "/js/dev.out"} 
 :init-fns [dev.workzone.config/main]}

It now loads properly.

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