This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-29
Channels
- # announcements (1)
- # babashka (83)
- # beginners (67)
- # chlorine-clover (22)
- # cider (11)
- # circleci (6)
- # clj-kondo (12)
- # cljs-dev (137)
- # cljsrn (15)
- # clojure (124)
- # clojure-europe (40)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-serbia (3)
- # clojure-spec (19)
- # clojure-uk (14)
- # clojuredesign-podcast (5)
- # clojurescript (80)
- # conjure (49)
- # core-async (62)
- # cursive (18)
- # datascript (1)
- # datomic (64)
- # docker (28)
- # emacs (20)
- # figwheel-main (249)
- # fulcro (95)
- # graalvm (2)
- # jobs-discuss (11)
- # joker (2)
- # juxt (4)
- # lambdaisland (9)
- # leiningen (1)
- # meander (14)
- # mount (6)
- # off-topic (16)
- # pathom (46)
- # re-frame (35)
- # reagent (6)
- # reitit (5)
- # shadow-cljs (28)
- # spacemacs (6)
- # sql (18)
- # tools-deps (26)
- # vim (8)
- # xtdb (23)
- # yada (1)
While using the :node-script
target, is it possible to have shadow inline all require(...)
calls in order to produce a single, standalone output file? I have the following in my cljs file:
(:require ["@cucumber/gherkin" :as gherkin]
["@cucumber/messages" :refer [IdGenerator]]
)
Which is leading to ...; var x=require("@cucumber/messages"); ...
calls in the compiled output. Wondering if there is any way to “inline” those. I’ve tried setting {:js-provider :shadow}
but then I run into:
The required JS dependency "stream" is not available, it was required by "node_modules/@cucumber/gherkin/dist/src/stream/GherkinStreams.js".
So I’m not sure that this provider is compatible with node…@cjsauer post-procress the output with https://github.com/vercel/ncc
Hi guys, I have a very basic beginner question: I try to get shadow-cljs working with deps.edn. In my deps.edn I defined the deps for shadow-cljs
:aliases
{:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.764"}
thheller/shadow-cljs {:mvn/version "2.9.10"}
reagent {:mvn/version "1.0.0-alpha2"}}}
when I now start shadow-cljs I get an error Use of undeclared Var reagent.core/render-component
. How can I import reagent into my project? ( and yes i have absolutly no idea what I"m doing :D )The full error message
Use of undeclared Var reagent.core/render-component
2 | (:require [reagent.core :as reagent]))
3 |
4 | (defn load-app []
5 | (reagent/render-component
6 | [:h1 "hallo"]
7 | (. js/document (getElementById "app"))))
8 |
9 | (defn ^:export init
this didn't work out, shadow tells me explicit that reagent is missing here. Any other idea?:face_with_rolling_eyes:
(reagent/render
-^---------------------------------------------------------------------
Use of undeclared Var reagent.core/render
it is telling you that var is missing. thats entirely difrerent error. reagent.core
exists just fine
maybe render was moved? I have no clue. you are using an alpha2 version so make sure that actually has what you need