@@ -402,10 +402,11 @@ object SbtWeb extends AutoPlugin {
402
402
* Create package mappings for assets in the webjar format. Use the webjars path prefix and exclude all web module
403
403
* assets.
404
404
*/
405
- def createWebJarMappings : Def .Initialize [Task [Seq [( FileRef , String ) ]]] = Def .task {
405
+ def createWebJarMappings : Def .Initialize [Task [Seq [PathMapping ]]] = Def .task {
406
406
def webModule (file : File ) = webModuleDirectories.value.exists(dir => IO .relativize(dir, file).isDefined)
407
407
implicit val fc : FileConverter = fileConverter.value
408
408
mappings.value flatMap {
409
+ case mapping if ! fileRefCompatible(mapping) => None
409
410
case (file, path) if webModule(toFile(file)) => None
410
411
case (file, path) => Some (file -> (webJarsPathPrefix.value + path))
411
412
}
@@ -450,10 +451,12 @@ object SbtWeb extends AutoPlugin {
450
451
/**
451
452
* Create package mappings for all assets, adding the optional prefix.
452
453
*/
453
- def packageAssetsMappings : Def .Initialize [Task [Seq [(FileRef , String )]]] = Def .task {
454
+ def packageAssetsMappings : Def .Initialize [Task [Seq [PathMapping ]]] = Def .task {
455
+ implicit val fc : FileConverter = fileConverter.value
454
456
val prefix = packagePrefix.value
455
- (Defaults .ConfigGlobal / pipeline).value map { case (file, path) =>
456
- file -> (prefix + path)
457
+ (Defaults .ConfigGlobal / pipeline).value collect {
458
+ case (file, path) if fileRefCompatible((file, path)) =>
459
+ file -> (prefix + path)
457
460
}
458
461
}
459
462
0 commit comments