diff --git a/scalajslib/src/mill/scalajslib/ScalaJSModule.scala b/scalajslib/src/mill/scalajslib/ScalaJSModule.scala index a8da94709a9..6ecd5dc2253 100644 --- a/scalajslib/src/mill/scalajslib/ScalaJSModule.scala +++ b/scalajslib/src/mill/scalajslib/ScalaJSModule.scala @@ -315,7 +315,7 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer => def scalaJSOutputPatterns: T[OutputPatterns] = Task { OutputPatterns.Defaults } /** - * Apply Scala.js-specific minification of the produced .js files. + * Apply Scala.js-specific minification of the produced .js files in fullLinkJS. * * When enabled, the linker more aggressively reduces the size of the * generated code, at the cost of readability and debuggability. It does diff --git a/scalajslib/worker/1/src/mill/scalajslib/worker/ScalaJSWorkerImpl.scala b/scalajslib/worker/1/src/mill/scalajslib/worker/ScalaJSWorkerImpl.scala index f1022fae005..e024ac1c9ff 100644 --- a/scalajslib/worker/1/src/mill/scalajslib/worker/ScalaJSWorkerImpl.scala +++ b/scalajslib/worker/1/src/mill/scalajslib/worker/ScalaJSWorkerImpl.scala @@ -151,7 +151,8 @@ class ScalaJSWorkerImpl extends ScalaJSWorkerApi { else withModuleSplitStyle val withMinify = - if (minorIsGreaterThanOrEqual(16)) withOutputPatterns.withMinify(input.minify) + if (minorIsGreaterThanOrEqual(16)) + withOutputPatterns.withMinify(input.minify && input.isFullLinkJS) else withOutputPatterns val withWasm =