Skip to content

Commit 5a21b68

Browse files
committed
Remove all comments from non-min builds to greatly reduce file size and defer to documentation.
1 parent 5acd032 commit 5a21b68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gulpfile.babel.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ const formatMap = {
7878

7979
// overwrite the comments strings in the config with functions
8080
// preserve the injected license header, strip everything else
81-
config.uglify.min.output.comments = (node, comment) => comment.line === 1;
82-
// preserve the injected license header, strip license blocks
83-
config.uglify.nonMin.output.comments = (node, comment) => comment.line === 1 || !(/@(uglify|license|copyright)/i.test(comment.value));
81+
config.uglify.min.output.comments = config.uglify.nonMin.output.comments = (node, comment) => comment.line === 1;
8482

8583
function bundle (format) {
8684
// only minify in prod and for global bundles

0 commit comments

Comments
 (0)