Skip to content

Commit 411e9b1

Browse files
committed
.
1 parent 5b336df commit 411e9b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sjsls/src/buildSpaRoute.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def buildSpaRoute(indexOpts: Option[IndexHtmlConfig], modules: Ref[IO, Map[Strin
5454
case Some(IndexHtmlConfig.IndexHtmlPath(dir)) =>
5555
StaticFileMiddleware(
5656
HttpRoutes.of[IO] {
57-
case req @ GET -> _ => serveIndexHtml(dir)
57+
case req @ GET -> _ => serveIndexHtml(dir, modules)
5858
},
5959
dir / "index.html"
6060
)(logger)

sjsls/src/static.routes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def staticAssetRoutes(
3131
case Some(IndexHtmlConfig.IndexHtmlPath(path)) =>
3232
HttpRoutes
3333
.of[IO] {
34-
case req @ GET -> Root => serveIndexHtml(path)
34+
case req @ GET -> Root => serveIndexHtml(path, modules)
3535

3636
}
3737
.combineK(
@@ -50,7 +50,7 @@ def staticAssetRoutes(
5050
)
5151
)(logger).combineK(generatedIndexHtml(injectStyles = true, modules, zdt)(logger))
5252

53-
def serveIndexHtml(from: fs2.io.file.Path) = StaticFile
53+
def serveIndexHtml(from: fs2.io.file.Path, modules: Ref[IO, Map[String, String]]) = StaticFile
5454
.fromPath[IO](from / "index.html")
5555
.getOrElseF(NotFound())
5656
.flatMap {

0 commit comments

Comments
 (0)