figwheel-main

figwheel-main http://figwheel.org
2021-02-05T14:29:28.020300Z

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...)

2021-02-05T18:36:10.020800Z

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

2021-02-05T18:37:17.021Z

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.

2021-02-05T21:22:23.021200Z

Oh? How do I do that then? 😃

2021-02-05T22:02:08.021400Z

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?