Skip to content

Commit

Permalink
Merge pull request #1978 from lift/disable-js-rewrite
Browse files Browse the repository at this point in the history
Disable the js auto-rewrite
  • Loading branch information
farmdawgnation committed Jan 1, 2020
2 parents 7979dd8 + 091e6dd commit 828df79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions web/webkit/src/main/scala/net/liftweb/http/ResourceServer.scala
Expand Up @@ -47,9 +47,12 @@ object ResourceServer {
}

@volatile var pathRewriter: PartialFunction[List[String], List[String]] = rewriter orElse {
case "lift.js" :: Nil => List("lift-min.js")
case "json.js" :: Nil => List("json2-min.js")
case "json2.js" :: Nil => List("json2-min.js")
// These automatic rewrites have been disabled since we're not currently
// minifying our internal js files on build. There's an open question in
// my mind as to whether or not we _should_ continue doin that.
// case "lift.js" :: Nil => List("lift-min.js")
// case "json.js" :: Nil => List("json2-min.js")
// case "json2.js" :: Nil => List("json2-min.js")
case xs => xs
}

Expand Down Expand Up @@ -136,4 +139,3 @@ object ResourceServer {
pathRewriter = rw orElse pathRewriter
}
}

Expand Up @@ -33,7 +33,6 @@ class ResourceServerSpec extends Specification {
"default json to json2 minified version" in {
(ResourceServer.pathRewriter("json.js"::Nil) must_== List("json2-min.js")) and
(ResourceServer.pathRewriter("json2.js"::Nil) must_== List("json2-min.js"))
}
}.pendingUntilFixed
}
}

0 comments on commit 828df79

Please sign in to comment.