3

I use grunt-contrib-coffee to generate my source maps and they all point to the correct location of the source .coffeescript files but they 404 as the /app/ folder is above the webroot which is /dist/.

Directory structure:

/app/
 |--scripts/script1.coffee
 |--scripts/script2.coffee
/dist/ (webroot)
 |--scripts/script1.js
 |--scripts/script2.js
Gruntfile.js

This is the generated map file.

"version": 3,
  "file": "script1.js",
  "sourceRoot": "../app/scripts/",
  "sources": [
    "script1.coffee"
  ]

The browser is looking for GET http://0.0.0.0:9000/app/scripts/app.coffee 404 (Not Found) but won't find it because it's not web accessible.

Should I make my webroot the same as the Gruntfile.js location? I don't want to end up with a trailing /dist/ on the URL

Any suggestions would be great.

Craig
  • 972
  • 3
  • 13
  • 38

0 Answers0