Skip to content

Commit 3f8a26c

Browse files
committed
chore: filter the classfiles and tasty when packaging scalajs-scalalib
1 parent b337d5d commit 3f8a26c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

project/Build.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,14 @@ object Build {
18851885
.exists(overwrittenSources.contains))
18861886

18871887
},
1888+
// Drop all the tasty files and the classfiles when packaging bu the scalajs exclusive classes
1889+
// More info here: https://github.com/scala-js/scala-js/issues/5217
1890+
Compile / packageBin / mappings := {
1891+
(Compile / packageBin / mappings).value.filter(file =>
1892+
file._2.endsWith(".sjsir")
1893+
|| file._2.endsWith("UnitOps.tasty") || file._2.endsWith("UnitOps.class") || file._2.endsWith("UnitOps$.class")
1894+
|| file._2.endsWith("AnonFunctionXXL.tasty") || file._2.endsWith("AnonFunctionXXL.class"))
1895+
},
18881896
libraryDependencies += ("org.scala-js" %% "scalajs-library" % scalaJSVersion).cross(CrossVersion.for3Use2_13),
18891897
libraryDependencies += ("org.scala-js" % "scalajs-javalib" % scalaJSVersion),
18901898
// Project specific target folder. sbt doesn't like having two projects using the same target folder

0 commit comments

Comments
 (0)