Commit d4624203 authored by Robert Knight's avatar Robert Knight

Read existing sourcemaps from content when minifying code

When minifying code with terser, make sure the existing sourcemaps for
the input code are taken into account.
parent db5d11b8
......@@ -31,8 +31,12 @@ function minifyStream() {
const code = Buffer.concat(this.chunks).toString();
const minified = terser.minify(code, {
// See https://github.com/terser/terser#minify-options-structure
sourceMap: { url: 'inline' },
sourceMap: {
content: 'inline',
url: 'inline',
},
}).code;
this.push(minified);
callback();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment