Hello,
I was searching why a (js/alert ) in app.core outside a -main function didn't show and noticed that the default compiler options do something strange.
Using '$clojure -M --main cljs.main --compile app.core ', you get 'out/main.js' as output file, and 'out' as output-dir. This also get written into 'out/cljsc_opts.edn'.
But 'out/main.js' still contains:
document.write('<script src="out/goog/deps.js"></script>');
document.write('<script src="out/cljs_deps.js"></script>');
The issue resolves itself when specifying --compile-opts '{:output-to "<file.js>"}' or output-dir. Or is this behaviour actually intended for some reason?
Another question: when playing with browser repl and weasel-websocket repl. Is it generally better to put it in the namespace or to put it inside a '-main' function and compile with --main app.core?
kind regards,
Dieter