Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default excludeFilter breaks having assets in submodules in Play Framework 2.4.x #19

Open
iadcode opened this issue Apr 20, 2016 · 0 comments

Comments

@iadcode
Copy link

iadcode commented Apr 20, 2016

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?

@iadcode iadcode changed the title default excludeFilter breaks having assets in submodules in Play Framework 2.4.x Default excludeFilter breaks having assets in submodules in Play Framework 2.4.x Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant