Fork me on GitHub
#shadow-cljs
<
2019-06-30
>
roooor02:06:15

@thheller I installed the Calva extension for VScode but never ran any REPL through the ide itself. Only connecting to the project via browser.

roooor02:06:01

im going to try running one of the example projects in the repo and see if i get the same results

gerry07:06:20

Hi I want to ask a question regarding the abandoned foreign-libs in shadow (sorry I am just setting things up with shadow so I am a very new user). I am trying to switch from figwheel to shadow and in my project I am using the monaco editor. Right now I have set up a webpack project just to import monaco and do some language configuration stuff. Then in my cljs project I just use foreign-libs with the usual global-exports option. How should I go about this in shadow?

thheller08:06:17

@gerry I recommend just including the webpack generated code separately via its own script tag and accessing the globals it exports normally via (js/thatGlobal.foo.bar)

thheller08:06:40

assuming the monaco-editor still has its weird own packaging style that shadow-cljs can't process

gerry08:06:26

Ok I see.. Yeah it still has this weird packaging. I wanted to include it via cljs in order for the closure compiler to do its magic and have an optimized build. There is no other way around it right?

thheller08:06:54

foreign-libs does not process the JS in any way so the result you get is the same

thheller08:06:17

I doubt that monaco would survive the closure compiler processing

gerry08:06:57

Oh ok I mistakenly thought that foreign-libs would feed the JS through closure. Thanks a lot for clarifying

thheller08:06:15

yeah it is just prepended as is. not processed at all

gerry09:06:25

I see, thanks for taking the time to help me! Have a nice day