[CLJS-616] relativize source map urls Created: 09/Oct/13 Updated: 05/Nov/13 Resolved: 05/Nov/13
|Reporter:||David Nolen||Assignee:||David Nolen|
The user provides :output-dir and :source-map. We should simply combine these to generate the relative paths based on :output-dir. We already copy all JS & CLJS files from jars into :output-dir, we should also copy any of user's CLJS files to :output-dir if :source-map enabled. This should satisfy both the server-less and web server source map use cases.
|Comment by David Nolen [ 26/Oct/13 4:53 PM ]|
Before moving on this I wonder if Chrome's flexibility for resolving source map location sufficiently addresses this?
|Comment by Eric Normand [ 28/Oct/13 12:38 PM ]|
Note that I am using ClojureScript in a Chrome extension.
Chrome seems to look in the original location using an absolute path. This is the URL I see in Chrome Dev Tools for one of my source-mapped files:
Each extension gets its own "space" (the noisy host part of the URL). But /Users/eric/sec... is the full, absolute path on the hard drive, not a path relative to that extension directory.
Is this related to the way paths are passed to Google Closure? They should be passed relative to the location of the source map.
|Comment by David Nolen [ 28/Oct/13 12:42 PM ]|
Happy to take a patch if you can confirm that making the paths relatively to the location of the source map will actually work. Such a patch would also need to properly handle files in JARs and those not actually local to the build (since arbitrary URLs are actually supported).
|Comment by David Nolen [ 05/Nov/13 11:32 AM ]|