This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-15
Channels
- # announcements (11)
- # beginners (66)
- # boot (6)
- # clara (25)
- # cljdoc (4)
- # cljs-dev (22)
- # clojure (261)
- # clojure-dev (1)
- # clojure-europe (2)
- # clojure-italy (15)
- # clojure-losangeles (1)
- # clojure-nl (19)
- # clojure-spec (62)
- # clojure-uk (50)
- # clojurescript (12)
- # community-development (6)
- # cursive (60)
- # datomic (21)
- # emacs (2)
- # figwheel (2)
- # figwheel-main (3)
- # fulcro (2)
- # graphql (11)
- # hyperfiddle (11)
- # javascript (1)
- # jobs (6)
- # juxt (1)
- # kaocha (5)
- # keechma (2)
- # off-topic (4)
- # onyx (10)
- # pathom (7)
- # re-frame (15)
- # reagent (8)
- # remote-jobs (2)
- # ring-swagger (14)
- # shadow-cljs (35)
- # sql (22)
- # testing (9)
- # tools-deps (62)
- # vim (12)
npx shadow-cljs watch server
shadow-cljs - config: /home/claudiu/clojure/fulcro-nodejs-ssr-example/shadow-cljs.edn cli version: 2.7.3 node: v8.11.0
shadow-cljs - starting via "clojure"
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: comp/*source-map-data-gen-col* in this context, compiling:(shadow/build/compiler.clj:455:13)
@claudiu 2.7.x
depends on cljs 1.10.439
yes. since cljs added that backwards incompatible change older versions don't work anymore
by the way... big big thank you for the shadow-cljs + node.js stuff. Really awesome dev experience 🙂
Don't know how much you're using fulcro & nodejs. But getting SSR with data from the network is like really easy & not much code overhead (nice experience on first load + refresh) 🙂 added a demo app https://github.com/claudiu-apetrei/fulcro-nodejs-ssr-example
cool. just one minor nitpick. separating src/main/app
and src/main/server
is not necessary. namespaces already split the code enough and server code won't be included in the app
build
Ahh yep, just a personal preference to keep the sever & app code in separate folders :) for this demo app just copy pasted the structure from another project :)
Yep. Named it app (instead of client) so all the client + shared should code should be there. Only the server should import from app.
should I add it to https://github.com/thheller/shadow-cljs#examples?
@U05224H0W Actually think it's better to not. It is just a proof of concept for fulcro SSR and I don't really think that express.js is the way to go. Will probably build an example app with nodejs+fulcro+pathom+code-splitting that uses https://macchiato-framework.github.io/ with a bit more app code, that one should be a nice addition for the shadow-cljs examples page.
Hi, I'm using the :npm-module
target (for now in convenience mode) to include some cljs into an existing JS project. I know that I can 'hot reload' the cljs code into the JS code base using shadow-cljs watch npm
, but is it also possible to use a cljs repl with that target? I've tried using cider and manage to start a cljs repl, but everytime I try to eval something it tells me that the application hasn't connected to the REPL server. I've tried navigating to
(which works), but this doesn't connect. Is connecting via browser even possible with :npm-module
?
@li1 since :npm-module
does not have a clearly defined entry the devtools cannot be injected automatically
so something like
{:source-paths
["src"]
:dependencies
[]
:runtime :browser
:builds {}}
?:builds
{:npm
{:target :npm-module
:runtime-browser
:output-dir "node_modules/shadow-cljs"}}
oh, and if this really proves to be unreliable with my setup, the fallback would basically be to write cljs without a repl and to restart my JS build server every time it needs to pick up changes? or is there something in-between?
it all depends on how much the JS is processed. don't know enough about your setup to comment really