I use Grunt to concat and minify files (with grunt-contrib-uglify and grunt-contrib-concat), and I wanted to add the source map. The uglify docs say that simply add the parameter for sourceMap set to boolean from true. But when I add this to my tasks (I tried a couple of different ones), the process works fine until it reaches the part of the original map, then I get:
Entering the truth ... ERROR
Warning: it is not possible to write a "true" file (error code: undefined). Use -force to continue.
Concatenation is performed, minimization is performed. But ... no luck in the original map.
Example from my Grunt file:
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
publicjs: {
options: {
sourceMap: true
},
files: {
'js/<%= pkg.name %>_public.min.js': ['<%= concat.publicjs.dest %>']
}
}
}
(I also tried using sourceMap in the top-level options object.)
? , Grunt , , , .