Reverse Router minified assets in Dev Mode

77 views
Skip to first unread message

John Zahka

unread,
Apr 7, 2016, 9:32:44 PM4/7/16
to play-framework

I'm having an issue where Play is grabbing the minified asset in Dev mode.

<script src="@routes.Assets.versioned("lib/angularjs/angular.js")"></script>

resolves to (in Dev mode)

<script src="/assets/lib/angularjs/angular.min.js"></script>

I'm definitely in Dev mode, any intuition on what may be happening?
Let me know if you need more details.

Matthias Kurz

unread,
Jul 1, 2016, 1:11:22 PM7/1/16
to play-framework
Hi John,

you are right, this is a bug in Play.
I set up this pull request to fix it: https://github.com/playframework/playframework/pull/6291

As a workaround until my fixes lands in Play you can turn it off globally (for dev and prod mode) via this setting:
assets.checkForMinified=false

Regards,
Matthias

Greg Methvin

unread,
Jul 2, 2016, 6:24:37 AM7/2/16
to play-framework
Well, I'm not saying the current behavior is necessarily the right one, but the problem is more the lack of documentation.

That setting should technically be enough to do what you need. You just need to specify an alternate configuration file and make sure assets.checkForMinified = true only in the production configuration.

Also we should probably switch those assets.* config keys to be play.assets.* and put them in reference.conf

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/0316624e-877e-4443-b8ac-c92f62d6fbf9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

Reply all
Reply to author
Forward
0 new messages