Original JavaScript sourcemap error 404 as source not available online

I am using grunt-contrib-coffee to generate source maps and they all point to the correct location of the source files .coffeescript

, but they are 404 since the folder /app/

is above the web root that 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 searches GET http://0.0.0.0:9000/app/scripts/app.coffee 404 (Not Found)

but won't find it because it's not available on the internet.

Should I make my webroot the same as the Gruntfile.js location? I don't want the /dist/

url to be displayed at the end of the page

Any suggestions would be great.

+3


source to share





All Articles