I am trying to get sourcemaps to play well while I use the Grunt task and UglifyJS Grunt.
Here is the current task:
uglify: { dist: { options: { sourceMap: function(path) { return path + ".map"; }, }, files: { 'dist/video.min.js': [ 'javascripts/video.js' ] } } }
What is the problem?
The source map is generated, but Chrome is looking for the source map in the wrong place (i.e. dist/dist/video.min.js.map ). I know this because I get 404 in the console.
So, I edited dist/video.min.js and changed sourceMappingURL to point to the correct location. Now the original map is loaded, but it is looking for the .js video in a completely wrong place: dist/javascripts/video.js (this again!)
So, basically, now I am not aware of any ideas, just not digging out the grunt file.
Any ideas? Thanks!
source share