Fork me on GitHub
#shadow-cljs
<
2022-09-02
>
Ivan Fedorov19:09:51

Guten abend, Thomas! Having some source map issues, keeps taking me to the wrong places. Trying to map a release build to sources

:app
{:target     :browser
 :output-dir "resources/public/js/compiled"
 :asset-path "/js/compiled"
 :compiler-options {:optimizations :advanced}
 :dev {:compiler-options {:optimizations :advanced}}
 :modules    {:app {:init-fn flow-ui.dev/init}}
 :release
 {:compiler-options
  {:source-map true
   :source-map-detail-level :all}}

  :build-options
  {:ns-aliases
   {day8.re-frame.tracing day8.re-frame.tracing-stubs}}}}}}

Ivan Fedorov19:09:51

Tried a couple of optimization options. Takes me to places that don’t exist

Ivan Fedorov19:09:25

Updated shadow-cljs, forgot to remove .shadow-cljs dir and relaunch server, currently doing this

Ivan Fedorov19:09:00

Relaunched, re-released, same error ^^ just with different paths On 2.20.1 cc @U05224H0W

thheller19:09:12

dunno what would be causing this. not aware of any source map issues in particular

thheller19:09:17

does it map correctly in dev?

Ivan Fedorov20:09:28

can I force :optimizations :advanced in dev? in dev I don’t have the error in the first place

Ivan Fedorov20:09:48

managed to see this in dev, yes

thheller20:09:18

dev doesn't do any optimizations ever

Ivan Fedorov20:09:39

it was a different Error in dev

Ivan Fedorov20:09:27

ok, then about the root problem that I want to find with source maps. It smells like another missing ^js or aget usage from my side. Can I somehow diable optimization for my JS files? Is that the place where I need externs? I also use d3, but the way I use it feels shaky

Ivan Fedorov20:09:00

But dev seems to map to source well, yes

Ivan Fedorov20:09:19

Maybe it’s that time when I need to go through https://shadow-cljs.github.io/docs/UsersGuide.html#externs section

thheller20:09:49

yes, the error is typical for externs issue

thheller19:09:21

looks fine?