-
Notifications
You must be signed in to change notification settings - Fork 21
Description
The default excludeFilter that sbt-uglify sets causes it to skip files in the web-modules directory. As I understand it, this is in an attempt to avoid uglifying files uncompressed from webjars.
Aside from not matching how other sbt-web plugins set the excludeFilter by default, this breaks having assets in the Play Framework from about 2.4.x onwards. (Possibly earlier, but I haven't seen anything indicating this is the case.)
As of about 2.4.x, submodule asset jars no longer get included in distributions. This is because the Play Framework uses ClassLoaders, and so having multiple asset jars might cause conflicts (see here)
To solve this, submodule assets get pulled in to the asset pipeline as if they are a webjar in the main project, and must be processed as if they are webjars. As a result, the default filter ignores these files and causes them to go unminified.
A workaround for people encountering such issues is to assign the following in your build.sbt...
excludeFilter in uglify := HiddenFileFilter... but perhaps the default excludeFilter should be changed to do this instead?