From b456eed0b789e4a1a7e3367430ed54f9dccaff83 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 19 Jun 2017 18:30:37 +0200 Subject: [PATCH] build: keep license comment in minified umd (#5196) * The `preserveComments` option from the old uglify gulp plugin is not valid for the programmatic API. Setting the `comments` option `some` means that license commens will be preserved. --- tools/package-tools/minify-sources.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/package-tools/minify-sources.ts b/tools/package-tools/minify-sources.ts index 382a955aa9c..2b85f16c4f1 100644 --- a/tools/package-tools/minify-sources.ts +++ b/tools/package-tools/minify-sources.ts @@ -7,8 +7,10 @@ const uglify = require('uglify-js'); export function uglifyJsFile(inputPath: string, outputPath: string) { const sourcemapOut = `${outputPath}.map`; const result = uglify.minify(inputPath, { - preserveComments: 'license', - outSourceMap: sourcemapOut + outSourceMap: sourcemapOut, + output: { + comments: 'some' + } }); writeFileSync(outputPath, result.code);