-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Hi there
is it on purpose that setting the sourceRoot option removes the coffee files' folder structure from the generated source map?
With sourceRoot set to coffee/
./assets/coffee/lib/utils.coffee
the generated source map at ./public/js/lib/utils.map will be:
"sourceRoot": "/coffee/",
"sources": [
"utils.coffee"
]
This makes Chrome unable to find the attached coffee file for a javascript file. As you can see on the attached file the old folder structure is completely removed.
So Chrome reconstructs the folder structure based on the source maps wrong. This makes it impossible for me to debug things because every request for a coffee file in a subfolder ends in a 404.
I'm using grunt to build:
coffee:
client:
options:
sourceMap: true
sourceRoot: '/coffee/'
files: [
expand: true
cwd: 'assets/coffee/'
src: ['**/*.coffee']
dest: 'public/js/'
ext: '.js'
]
Is something wrong with my build setup? Or is this a bug (or a feature ;))? I'm on 1.6.3.
