diff --git a/tools/bundler.js b/tools/bundler.js index 4f18f57fa7..00de0b103b 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -940,17 +940,6 @@ _.extend(ClientTarget.prototype, { // Use a SHA to make this cacheable. var sourceMapBaseName = file.hash() + ".map"; - // XXX When we can, drop all of this and just use the SourceMap - // header. FF doesn't support that yet, though: - // https://bugzilla.mozilla.org/show_bug.cgi?id=765993 - // Note: if we use the older '//@' comment, FF 24 will print a lot - // of warnings to the console. So we use the newer '//#' comment... - // which Chrome (28) doesn't support. So we also set X-SourceMap - // in webapp_server. - file.setContents(Buffer.concat([ - file.contents(), - new Buffer("\n//# sourceMappingURL=" + sourceMapBaseName + "\n") - ])); manifestItem.sourceMapUrl = require('url').resolve( file.url, sourceMapBaseName); } @@ -1200,12 +1189,6 @@ _.extend(JsImage.prototype, { { data: new Buffer(item.sourceMap, 'utf8') } ); - var sourceMapFileName = path.basename(loadItem.sourceMap); - // Remove any existing sourceMappingURL line. (eg, if roundtripping - // through JsImage.readFromDisk, don't end up with two!) - item.source = item.source.replace( - /\n\/\/# sourceMappingURL=.+\n?$/, ''); - item.source += "\n//# sourceMappingURL=" + sourceMapFileName + "\n"; loadItem.sourceMapRoot = item.sourceMapRoot; }