diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-03-28 14:18:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 22:18:56 +0800 |
commit | 827bcec1860534442e82e9ccdfc2aca808fada5e (patch) | |
tree | 1e9b2dd08fc652a63f2709c15e17bcc3432375f6 /lib/minify.js | |
parent | d105ab9722e7a126b149b1ddf724d0eaf4144d86 (diff) | |
download | tracifyjs-827bcec1860534442e82e9ccdfc2aca808fada5e.tar.gz tracifyjs-827bcec1860534442e82e9ccdfc2aca808fada5e.zip |
handle `source-map` operations internally (#3754)
Diffstat (limited to 'lib/minify.js')
-rw-r--r-- | lib/minify.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/minify.js b/lib/minify.js index 72d99576..ab397f5e 100644 --- a/lib/minify.js +++ b/lib/minify.js @@ -203,6 +203,7 @@ function minify(files, options) { if (!HOP(options.output, "code") || options.output.code) { if (options.sourceMap) { options.output.source_map = SourceMap({ + content: options.sourceMap.includeSources, file: options.sourceMap.filename, orig: source_maps, root: options.sourceMap.root @@ -211,10 +212,8 @@ function minify(files, options) { if (files instanceof AST_Toplevel) { throw new Error("original source content unavailable"); } else for (var name in files) if (HOP(files, name)) { - options.output.source_map.get().setSourceContent(name, files[name]); + options.output.source_map.setSourceContent(name, files[name]); } - } else { - options.output.source_map.get()._sourcesContents = null; } } delete options.output.ast; |