Fork me on GitHub
#shadow-cljs
<
2022-11-03
>
Chris McCormick02:11:24

Does anybody know if there is a way to get Vim + Fireplace to default to a particular build instead of typing :CljEval (shadow/repl :app)? Would be cool if I could specify this in shadow-cljs.edn or similar.

thheller05:11:21

your client has to initiate the switch to a specific build, so no there is no option for this in shadow-cljs

👍 1
jaide06:11:58

What's the best way to inline the value of a build-time env var like NODE_ENV?

jaide06:11:46

Thank you! Should have looked there first

thheller06:11:19

well I strongly recommend never using environment variables but people generally don't listen to me 😛

jaide06:11:38

Oh! What would you suggest instead? Or should I get that from the docs?

jaide06:11:55

Ohhh --config merge cmd

jaide06:11:09

I'll use that instead

thheller06:11:23

do you want to set an actual compile time constant? or is it actual runtime configuration, like actual env variables would be?

jaide17:11:25

It was an actual compile time constant

jaide18:11:47

Is goog-define already defined or do I need to import the goog library?

jaide19:11:25

Nevermind, got it working was using it incorrectly

brunex15:11:42

[:app] Build failure:
Closure compilation failed with 5 errors
--- node_modules/@chakra-ui/descendant/dist/index.cjs.js:69
Transpilation of 'Not a class declaration' is not yet implemented.
--- node_modules/@chakra-ui/modal/dist/index.cjs.js:85
Transpilation of 'Not a class declaration' is not yet implemented.
--- node_modules/@chakra-ui/react-use-pan-event/dist/index.cjs.js:39
Transpilation of 'Not a class declaration' is not yet implemented.
--- node_modules/@chakra-ui/react/node_modules/@chakra-ui/utils/dist/index.cjs.js:999
Transpilation of 'Not a class declaration' is not yet implemented.
--- node_modules/@chakra-ui/system/node_modules/@chakra-ui/utils/dist/index.cjs.js:999
Transpilation of 'Not a class declaration' is not yet implemented.
Hi guys, getting these errors with shadow-cljs latest versions, any help ^^

jaide17:11:00

By chance do you have the code anywhere? Or could you make a repo with the minimal reproduction case?

thheller18:11:11

these are errors from the closure compiler. looks like the code is using features it doesn't support

thheller18:11:21

can't do much about that from the shadow-cljs side unfortunately

brunex11:11:07

@U05224H0W when trying to use

:js-options
{:js-provider :external}
it throws a this error regarding react object? but the object shadow.js.shim.module$react is available … weird 😕

thheller18:11:16

uhm :js-provider :external doesn't use this? did you maybe load the wrong code or some bad cache?

Lone Ranger18:11:12

Is there some equivalent of :figwheel-always for shadow-cljs? Specifically in relation to reloading javascript changes for things that aren't directly in the path of the init-fn ? I'm trying to use some sidecar files to not clutter up the program while I'm experimenting

thheller18:11:55

not sure I understand. what does "some sidecar files" mean?

Lone Ranger18:11:02

some scratch files

thheller18:11:12

ah, so files not part of the regular build?

Lone Ranger18:11:18

instead of an inline comment block. Yeah exactly

Lone Ranger18:11:30

I guess a second build would do the trick?

Lone Ranger18:11:42

:thinking_face:

thheller18:11:53

there is :dev/always but that won't magically include the files in the build

thheller18:11:00

you can use :preloads to add them though

Lone Ranger18:11:22

whoaaa, outstanding

Lone Ranger18:11:17

yessss that was exactly it 👏 👏 👏