So I'm using Browserify and Minifyify to bundle up some JS source code, and generate source maps.
Minifyify claims to point back to the original source files, but when I look at the source maps in Chrome, what I see are minified versions of the original files. And any stack traces in console errors always show line 1, since all of the code is then in a single line.
Is this the expected behavior of Minifyify, and if not, is there something else I need to do to get source maps with the original source?
My setup looks like this:
var hbsfy = require("hbsfy").configure({
extensions: ["html"]
});
var fs = require('fs');
var opts = { debug: true };
var browserify = require("browserify");
var scriptFile = './app.js';
var outputFile = './build/app.min.js';
var mapFile = 'app.min.map';
var mapOutput = './build/app.min.map';
var b = new browserify(opts);
b.add(scriptFile);
b.transform(hbsfy);
b.plugin('minifyify', { map: mapFile, output: mapOutput });
b.bundle().pipe(fs.createWriteStream(outputFile));