This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-18
Channels
- # announcements (17)
- # babashka (109)
- # beginners (212)
- # calva (1)
- # chlorine-clover (7)
- # cider (8)
- # clj-kondo (31)
- # cljsrn (2)
- # clojure (33)
- # clojure-dusseldorf (1)
- # clojure-finland (2)
- # clojure-france (22)
- # clojure-germany (1)
- # clojure-losangeles (1)
- # clojure-spec (6)
- # clojure-uk (19)
- # clojurescript (31)
- # conjure (41)
- # cryogen (1)
- # data-science (11)
- # datomic (6)
- # emacs (5)
- # exercism (8)
- # figwheel-main (2)
- # fulcro (57)
- # graalvm (15)
- # hoplon (15)
- # jobs-discuss (32)
- # kaocha (7)
- # off-topic (14)
- # pathom (2)
- # planck (9)
- # quil (1)
- # rum (5)
- # shadow-cljs (34)
- # spacemacs (33)
- # tools-deps (1)
- # xtdb (9)
Did you try the config merge flag?
Hi all, I have a small experimental Clojure library (https://github.com/eamonnsullivan/github-search) that I'd like to turn into a mono-repo that produces both a jar and an npm package (shadow-cljs), with some common code (.cljc). Is this possible? Has anyone tried this and can point me to an example I can study?
Code consumed by JS, installable via npm or yarn.
Hello everyone
I have a re-frame project where I need to have some react components written in React JSX.
I’m trying to build my project following the shadow-cljs guide about importing and cosuming javascript modules and everything compiles correctly, but when I’m using my js component in my cljs code, i get the following error:
TypeError: Cannot read property ‘createElement’ of undefined
the babel generated code for the component is this:
import React from ‘react’; function myComponent() { return /#PURE__/React.createElement(“h1”, null, “JSX!“); } export { myComponent };
and the generated code looks like this:
var module$node_modules$react$index = shadow.js.require(“module$node_modules$react$index”, {}); function myComponent$$module$myComponent() { return module$node_modules$react$index.default.createElement(“h1", null, “JSX!“); }
it seems that that extra default property in the return statement leads to the error
module$node_modules$react$index in the browser js runtime exists and has a createElement attribute
I’m using shadow-cljs version 2.8.97
I’m really stuck
import React from ‘react’;
this is the issue, should be import * as React from "react";
oh sorry
thank you very much for the hint
well technically your way is correct but commonjs<->esm interop is weird at the moment
it works perfectly with your suggested change
thank you
and thank you very much also for shadow-cljs
e fantastic tool!
By the way, recently I was having trouble using shadow-cljs with an electron project. I was getting an error: failed to parse websocket message...
when whatching my project and running electron.
I was just abouit to open an issue right now, and it's already fixed! Thanks a lot 😄
For some reason, since the version, version 2.8.90 I was having some problems with different targets like electron, with a message
failed to parse websocket message {:type :repl/init, :repl-state {...lots of things here...
fixed in 2.8.98. some REPL files weren't actually written to disk unless they were used in the regular build
Hello all, wondering if anyone here has had any success working with shadow-cljs in WSL2 on windows? I'm getting this error any time I try to start either the browser or node-repl:
[:browser-repl] Build completed. (130 files, 0 compiled, 0 warnings, 2.55s)
null=> Execution error (AssertionError) at shadow.cljs.repl/read-one (repl.clj:535).
Assert failed: (symbol? read-ns)