I think the default is your last focused tab. This is mentioned in the docs somewhere, possibly with how to change it.
Hi everyone ! I’m trying to get a figwheel-main dev setup to work without success. I’m stuck with some lost web socket connections. I have two different clojure servers, one is the client that serves a hybrid app that has server side rendered stuff ( 8080 ) and some reagent, the other one is just a proxy ( 3001 ). All connections are made trough the proxy ( browser is looking at <localhost://3001|localhost:3001> ). How can I configure figwheel to watch the files from the client for local changes, but get the proxy to trigger the hot-reload ?
@othman.azil I have a similar setup
@othman.azil I'm using this config:
^{:watch-dirs ["src-cljc" "src-cljs" "src-cljs-dev"]
:css-dirs ["frontend/public/css"]
:auto-testing false
:connect-url "ws://[[client-hostname]]:9500/figwheel-connect"
:open-url false}
This means that figwheel will connect to its own server on port 9500, but this is from javascript served from my own server
E.g. I'm requesting 10.0.1.15:3700 which will serve all HTML, JS and CSS. And then figwheel will connect to 10.0.1.15:9500 to do its websocket thing for reloading
Hope that helps
Note that [[client-hostname]]
is literally that, don't substitute it manually, figwheel will figure the IP or hostname out via javascript
It worked @borkdude! Thank you so much.
Any idea about why this could happen? There was an issue about this a long time ago https://github.com/bhauman/figwheel-main/issues/21 but I'm using much newer versions of the dependencies
[Figwheel] Compiling build dev to "resources/public/cljs-out/dev-main.js"
Options passed to ClojureScript compiler: {:output-dir "resources/public/cljs-out", :closure-warnings {:check-types :off, :check-variables :off}, :closure-defines {"figwheel.repl.connect_url" "<ws://localhost:9510/figwheel-connect?fwprocess=b7785e&fwbuild=dev>", "figwheel.repl.client_log_level" "warning"}, :ups-libs nil, :cache-analysis true, :closure-module-roots [], :optimizations :none, :ups-foreign-libs [{:file "cljsjs/react-dom/development/react-dom.inc.js", :file-min "cljsjs/react-dom/production/react-dom.min.inc.js", :provides ["react-dom" "cljsjs.react.dom"], :requires ["react"], :global-exports {react-dom ReactDOM}} {:file "cljsjs/react-dom/development/react-dom-server.browser.inc.js", :file-min "cljsjs/react-dom/production/react-dom-server.browser.min.inc.js", :provides ["react-dom/server" "cljsjs.react.dom.server"], :requires ["react-dom"], :global-exports #:react-dom{server ReactDOMServer}} {:file "cljsjs/react-dom/development/react-dom-test-utils.inc.js", :file-min "cljsjs/react-dom/production/react-dom-test-utils.min.inc.js", :provides ["react-dom/test-utils" "cljsjs.react.dom.test-utils"], :requires ["react-dom"], :global-exports #:react-dom{test-utils ReactTestUtils}} {:file "cljsjs/react/development/react.inc.js", :provides ["react" "cljsjs.react"], :requires [], :file-min "cljsjs/react/production/react.min.inc.js", :global-exports {react React}}], :parallel-build true, :verbose true, :aot-cache false, :preloads [figwheel.core figwheel.main figwheel.repl.preload devtools.preload figwheel.main.system-exit figwheel.main.css-reload process.env], :ignore-js-module-exts [".css"], :output-to "resources/public/cljs-out/dev-main.js", :preamble ["cljs/imul.js"], :asset-path "/cljs-out", :repl-requires ([figwheel.repl :refer-macros [conns focus]] [figwheel.main :refer-macros [stop-builds start-builds build-once reset clean status]] [cljs.pprint :refer [pprint] :refer-macros [pp]] [cljs.repl :refer-macros [source doc find-doc apropos dir pst]]), :ups-externs ("cljsjs/react-dom/common/react-dom-server.ext.js" "cljsjs/react-dom/common/react-dom.ext.js" "cljsjs/react-dom/common/react-dom-test-utils.ext.js" "cljsjs/react/common/react.ext.js"), :opts-cache "cljsc_opts.edn", :source-map true, :cache-analysis-format :transit, :compiler-stats true, :main weather-app.core, :language-in :es6, :emit-constants nil}
internal/modules/cjs/loader.js:1088
throw err;
^
Error: Cannot find module '@cljs-oss/module-deps'
Require stack:
-
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1085:15)
at Function.Module._load (internal/modules/cjs/loader.js:928:27)
at Module.require (internal/modules/cjs/loader.js:1145:19)
at require (internal/modules/cjs/helpers.js:75:18)
at [eval]:8:13
at Script.runInThisContext (vm.js:132:18)
at Object.runInThisContext (vm.js:315:38)
at Object.<anonymous> ([eval]-wrapper:10:26)
at Module._compile (internal/modules/cjs/loader.js:1256:30)
at evalScript (internal/process/execution.js:98:25) {
code: 'MODULE_NOT_FOUND',
}
it looks like it's exploding when trying to load the react-dom library