Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrdom committed May 20, 2022
1 parent ecb5b6f commit d33cb21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ val manual =
val `scalajs-bundler` =
project.in(file("."))
.settings(noPublishSettings: _*)
.aggregate(`sbt-scalajs-bundler`, `sbt-web-scalajs-bundler`, `scalajs-bundler-linker`)
.aggregate(`sbt-scalajs-bundler`, `sbt-web-scalajs-bundler`)

inThisBuild(List(
scalacOptions ++= Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,14 @@ object BundlerFile {
}

private def resolveApplicationAssets(stats: WebpackStats) = {
val (notExisting, existing) = stats.resolveAllAssets(targetDir)
.foldLeft((List.empty[File], List.empty[File])) {
case ((notExisting, existing), asset) =>
if (asset.exists()) {
(notExisting, existing :+ asset)
} else {
(notExisting :+ asset, existing)
}
}
if (notExisting.nonEmpty) {
val assets = stats.resolveAllAssets(targetDir)
val nonExisting = assets.filter(!_.exists())
if (nonExisting.nonEmpty) {
throw new RuntimeException(
s"Webpack failed to create application assets:\n" +
s"${notExisting.map(asset => s"${asset.getAbsolutePath}").mkString("\n")}")
} else {
existing
s"${nonExisting.map(asset => s"${asset.getAbsolutePath}").mkString("\n")}")
}
assets
}

/**
Expand Down

0 comments on commit d33cb21

Please sign in to comment.