Uploaded image for project: 'ClojureScript'
  1. CLJS-674

Relative paths are incorrect when source map isn't in same directory as project.clj

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Environment:

      CLJS 2030

    • Patch:
      Code

      Description

      For example:

      (defproject sandbox "0.1.0"
        :dependencies [[org.clojure/clojure "1.5.1"]
                       [org.clojure/clojurescript "0.0-2030"]]
      
        :plugins [[lein-cljsbuild "1.0.0-alpha2"]]
      
        :source-paths ["src"]
      
        :cljsbuild { :builds [{:id "sandbox"
                               :source-paths ["src"]
                               :compiler { :output-to "dist/main.js"
                                           :output-dir "dist/out"
                                           :optimizations :advanced
                                           :source-map "dist/main.js.map"}}]})
      

      Chrome looks for dist/dist/out/foo.cljs instead of dist/out/foo.cljs
      You can manually fix it by opening dist/main.map.js and changing all the dist/out to out.
      I think the general solution is that all the paths must be relative to the parent of :source-map

      See: https://github.com/fivetran/cljs-source-maps-incorrect-paths

      Potentially related to http://dev.clojure.org/jira/browse/CLJS-591

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              georgetran George Fraser
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: