Fork me on GitHub

I just discovered that if you create a new project with lein new luminus myproject +cljs and try to lein cljsbuild once you get an error:

Exception in thread "main" java.lang.AssertionError: Assert failed: :source-map true must specify a file in the same directory as :output-to "target/cljsbuild/public/js/app.js" if optimization setting applied
Could be fixed either by adding {:source-map "target/cljsbuild/public/js/"} or {:optimizations :none} to :project/dev -> :cljsbuild -> :builds -> :app -> :compiler. @yogthos: I'd be happy to do a bug report and/or pull request if you'd like. If the latter, let me know which fix you'd prefer (or if it's some other fix entirely).


That's actually the expected behavior, the project is setup for using figwheel


In not sure if there's a good way to get both ways of compiling working, if you'd like to take a look I'll be happy to take a PR :-)


Huh. Still, if you're specifying additional :cljsbuild config in :project/dev, it seems like it would make sense that it be cljsbuild-compatible. Your call, though, of course. I'll poke around & see if they can both work simultaneously.


That is, if it's not intended to be cljsbuild-compatible, why specify the additional :cljsbuild config?


@yogthos: just tested; either of those solutions works fine w/ figwheel, while simultaneously enabling cljsbuild to work. Got a preference on which solution I implement for a PR?


I'm also noticing something kinda odd -- on a fresh project with lein new luminus myproject +cljs, lein run and lein figwheel end up serving on different ports (3000 vs 3449). Is there a reason for that? I'm used to them being on the same port.


I think moving :optimizations :none to dev would make sense


I can push out a new version tonight


the 3449 server is started by figwheel and it uses its embedded http-kit for that


so it doesn’t necessarily have the same behavior as the actual server run on 3000


I find the figwheel server is useful if you’re just doing something with the front-end, but for anything backend related I recommend using the port 3000 server


the biggest difference is with websockets as the implementation is server specific


Ah, interesting, ok. I'll throw together a PR for you.


ok awesome!