Fork me on GitHub
#shadow-cljs
<
2020-01-15
>
lilactown17:01:42

bringing this from #clojurescript: trying to use closure syntax leads to an error

failed to load workshop.core.js ReferenceError: $jscomp is not defined
    at Object.createComponent (classes.js:8)

lilactown17:01:26

happy to create a github issue if it’s not a quick fix on my end

thheller20:01:19

if you intend to use class you should probably set :compiler-options {:output-feature-set :es6}

lilactown20:01:57

Does that mean gcc will output es6?

thheller21:01:40

but thats the point right? I mean why else do you use class?

thheller21:01:53

hmm or was class es5? can't remember

thheller21:01:08

missing $jscomp is weird though. dunno what that is about

thheller21:01:12

do you use :modules?

lilactown21:01:07

Class was es6. But I'm using this purely to interop with React so I would expect gcc to be able to compile the classes to es5

lilactown21:01:21

I'm not using modules. This is in a library

thheller21:01:06

why not write the "transpiled" version in regular CLJS then? 😛

lilactown21:01:06

I want it to use actual classes if available

lilactown21:01:25

Doing the transpiled version with actual classes doesn't work

thheller21:01:08

btw

helix.impl = helix.impl || {};

helix.impl.classes = helix.impl.classes || {};

thheller21:01:12

this is not something you need to do

thheller21:01:18

thats what goog.provide does

lilactown21:01:27

Ah ok, wasn't sure