This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-15
Channels
- # announcements (1)
- # aws (79)
- # babashka (47)
- # beginners (82)
- # calva (65)
- # cider (27)
- # cljdoc (18)
- # cljs-dev (29)
- # clojure (189)
- # clojure-dev (5)
- # clojure-europe (3)
- # clojure-italy (1)
- # clojure-madison (6)
- # clojure-nl (4)
- # clojure-spec (10)
- # clojure-uk (41)
- # clojured (3)
- # clojurescript (5)
- # clojurex (17)
- # cursive (30)
- # data-science (7)
- # datomic (17)
- # emacs (3)
- # events (6)
- # fulcro (2)
- # funcool (9)
- # graalvm (29)
- # jobs-discuss (3)
- # joker (3)
- # kaocha (6)
- # malli (5)
- # music (6)
- # off-topic (21)
- # reagent (3)
- # reitit (4)
- # rewrite-clj (8)
- # shadow-cljs (49)
- # spacemacs (7)
- # sql (23)
- # tools-deps (15)
- # vim (43)
- # xtdb (19)
anyways .. wrote it all again in case someone is interested in the vdom stuff. still very far away from something actually usable but some of you seemed interested https://github.com/thheller/shadow-experiments/blob/master/doc/arborist-components.md
Hi, I'm so sorry to bother you. I have run a react-native
project, and use a js
file in it. The project looks like:
src
āāā main
ā āāā main.clj
āāā js_libs
ā āāā my.js
If I run it in product
mode, works well. And I run it in development
mode, then occurs an error:
Can't find variable: shadow$provide
eval
[native code]
globalEval
index.js:828:25
evalLoad
index.js:2082:24
<unknown>
index.js:2404:20
loadModuleImplementation
require.js:331:6
<unknown>
index.js:1
loadModuleImplementation
require.js:331:6
guardedLoadModule
require.js:197:45
global code
What's the shadow$provide
? @thheller@180338742 the JS support currently has issues with commonjs code. try to use ESM import/export instead
but I want to wire my own handler, who is created by invoking a fn (defn make-handler [cfg]...)
in my experience 100% of the time where you need handlers that actually do stuff you should be writing your own server
Thats great insight; I guess my handler just needs to render the appropriate html file then?
I'm just assuming here that the handler you are talking about is an actual CLJ server-side "app"
@thheller After upgrading shadow and React to the latest version, hot-reloading lazy-loaded components with hx works -- here's an example repo for anyone curious: https://github.com/orestis/shadow-hx-lazy-load
The "empty" row is the one of the first screenshot, the expanded date-fns
is what I show now.
Interesting: node_modules/date-fns/parseISO/index.js
vs node_modules/date-fns/_lib/setUTCDay/index.js
-- there's a _lib
prefix in the last one.
Hah, it's actually different files. Not sure why the reporting looks off, but the actual content is not duplicated as I thought -- so it's only a reporting glitch.
Ah, I thought that this was fixed in the CLJS compiler? I saw some discussion and "closed" ticket in cljs-dev
.
The code I see generated looks like: $APP.l(!1)&&(JO.displayName="nosco.views.page-list/DeletePagesButton")
I got a little bit obsessed with code size, having seen my build balloon to 2MB of JS, so now I'm testing out splitting code etc. Of course, most of it is huge JS libraries.
Yeah, bringing in their own polyfills even. And then when I wanted to use https://projectfluent.org, they hard-drop IE11 compatibility by extending Map
so no polyfill can fix that š
If a JS project exports both common.js and ESM versions, like
"main": "dist/react-beautiful-dnd.cjs.js",
"module": "dist/react-beautiful-dnd.esm.js",
it seems shadow prefers the cjs one. Does it make any practical difference?