Fork me on GitHub
#shadow-cljs
<
2021-08-06
>
Ar Nazeh08:08:57

I am trying to consume a library that is using the experimental classProperties

static ERROR = ERROR
Is there a way to configure Shadow to work with that?

thheller08:08:58

consume how? what is the problem?

Ar Nazeh08:08:01

Just importing it in a build that targets the browser

(ns app.client.hyper
  (:require ["hyperspace" :refer [Client Server]]))
and this is the error
Failed to inspect file
  /media/arnazeh/two/code/synonym/haystack/demo_cljs/node_modules/arpeecee/index.js

it was required from
  /media/arnazeh/two/code/synonym/haystack/demo_cljs/node_modules/hrpc-runtime/rpc.js

Errors encountered while trying to parse file
  /media/arnazeh/two/code/synonym/haystack/demo_cljs/node_modules/arpeecee/index.js
  {:line 60, :column 15, :message "'(' expected"}
But I know from trying the same thing with a create-react-app project that the problem is the experimental classProperties, it suggested using a https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties and pointed out this https://github.com/mafintosh/arpeecee/blob/master/index.js#L60 as the reason of the error.

thheller08:08:11

which shadow-cljs version is this?

thheller08:08:50

as far as I know the closure compiler added support for this

thheller08:08:07

maybe not though. if you are on the latest version probably not.

thheller08:08:17

then there is nothing to do unfortunately

thheller08:08:18

yeah no luck then

3
thheller08:08:07

well you can always use webpack as described here in option 2 https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html

🙏 3
Ar Nazeh09:08:07

I will try that

lispers-anonymous18:08:47

I just upgrade to the latest version of shadow-cljs and my build report now has some of the dependencies in red. I think this means that the red dependencies are duplicated across modules. Is that correct? Example picture is attached

thheller20:08:07

hmm I guess thats a bug. its supposed to be red for duplicated npm packages only

lispers-anonymous20:08:16

It did also show up for duplicate npm packages. Would you like me to file an issue on github about it?