Fork me on GitHub
#figwheel-main
<
2021-02-05
>
folcon14:02:28

I've got an odd situation happening with figwheel-main bundling. The source-code generated has got mangled names, but when I breakpoint in the debugger, the names provided aren't mangled at all. Not sure yet how to produce a minimal repo, but any ideas what could be happening? I'm using an npm lib which I'm requiring as follows:

[exceljs]
This seems to work fine:
(-> (exceljs/Workbook.)
        .-xlsx)
This sort of thing less so:
(defn get-xlsx [workbook] (.-xlsx workbook))
(get-xlsx (exceljs/Workbook.))
(I'm saying sort of thing because this only happens in the minified case and as I said, I've not got a minimal repro just yet...)

Braden Shepherdson18:02:10

possibly there's trouble with renaming, maybe you need to add some externs for exceljs so those symbols aren't renamed.

Braden Shepherdson18:02:17

NB there's a mode for Closure compiler you can run a build with that does the renaming, but it mostly renames things fooBar to fooBar_, so you can see the breakages without struggling with the opaque names.

folcon21:02:23

Oh? How do I do that then? 😃

folcon22:02:08

Hmm, I'm pretty confident it's the google closure compiler now, I thought that it might be webpack, but it's not. I'm looking at using cljs-oops, but I was under the impression that the new npm functionality would handle this sort of thing?