ClojureScript

Source map string in JS output is not relative to JS file

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

If I set the following options in lein cljsbuild configuration:

:output-to "js/script.js"
:source-map "js/script.js.map"

This line gets appended to js/script.js:
//@ sourceMappingURL=js/script.js.map

Since this is a relative URL, it is looking for it relative to js/script.js. Therefore, the browser looks in js/js/script.js.map.

The URL should be relative to the location of the output JS file.

  1. clojurescript-source-map.patch
    16/Sep/13 3:54 PM
    2 kB
    Eric Normand
  2. source-map2.patch
    11/Oct/13 11:36 AM
    0.9 kB
    Eric Normand
  3. sourcemaps.patch
    11/Oct/13 11:26 AM
    0.5 kB
    Eric Normand

Activity

Eric Normand made changes -
Field Original Value New Value
Attachment sourcemaps.patch [ 12313 ]
Eric Normand made changes -
Attachment source-map2.patch [ 12314 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: