Clojurians
#cljs-dev
<
2018-10-16
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

vikeri12:10:46

A question regarding source-maps. If I try source-map resolve index.js.map lineNumber rowNumber I get the following output:

Maps to pilloxa/views/dashboard.cljs:550:47
Could not resolve mapping:  Cannot read property 'split' of null
So it correctly finds the position in the clojurescript code but does not output the actual code. Is this a known bug? I’m using [email protected]

vikeri12:10:41

My compiler config:

{:output-to          "app/target/dist/index.js"
  :main               "env.main"
  :static-fns         true
  :optimize-constants true
  :parallel-build     true
  :optimizations      :advanced
  :output-dir         "app/target/dist/"
  :source-map         "app/target/dist/index.js.map"
  :target             :nodejs
  :closure-defines    {"goog.DEBUG" false}}

vikeri12:10:03

Also tried in a small project and got the same result

thheller12:10:14

@vikeri that sounds like a bug in source-map-cli?

vikeri12:10:32

@thheller Reasonable, I searched the issues on Github but didn’t see anything.

vikeri12:10:41

I’ve heard of others using that tool with cljs but I’ll assume that there’s nothing wrong with what ClojureScript emits

thheller12:10:18

there is nothing wrong with the source maps CLJS emits other than that they are incomplete and missing cljsjs.*