Skip to content

Commit 8ff09b2

Browse files
committed
build: update build doc
1 parent d0a5e60 commit 8ff09b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gulpfile.js/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ function makeJSDist() {
142142
preserveComments: function (node, comment) {
143143
const text = (comment.value || "").trim();
144144

145+
// license headers should not end up in distribution as the license of dist depends on
146+
// internal vs external builds. we strip every comment except with below flag.
145147
// Preserve ONLY comments starting with "DONT_STRIP_MINIFY:"
146148
return text.includes("DONT_STRIP_MINIFY:");
147149
}
@@ -588,12 +590,14 @@ const minifyablePaths = [
588590

589591
function _minifyBrowserContextFile(fileContent) {
590592
const minified = terser.minify(fileContent, {
591-
mangle: false,
593+
mangle: true,
592594
compress: {
593595
unused: false
594596
},
595597
output: {
596598
comments: function(node, comment) {
599+
// license headers should not end up in distribution as the license of dist depends on
600+
// internal vs external builds. we strip every comment except with below flag.
597601
const text = comment.value.trim();
598602
return text.includes("DONT_STRIP_MINIFY:");
599603
}

0 commit comments

Comments
 (0)