File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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
589591function _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 }
You can’t perform that action at this time.
0 commit comments