How to activate javascript thumbnail?

The game documentation says that "By default, the [Assets] controller provides caching, ETag, gzip compression, and support for the JavaScript mini-interface."

How to configure the game to minimize javascripts files? This was not done in the default settings in dev or prod mod, and the document does not explain this.

Thanks.

+6
source share
1 answer

Make sure your javascript resources are in the /app/assets/javascript folder (so you get the Google Closure Compiler ), and then, you just need to name your js file with anyname **. min **. js

View example:

 <script src="@controllers.Assets.at("public", "javascripts/whatevername.min.js")" type="text/javascript"></script> 
+5
source

Source: https://habr.com/ru/post/918779/


All Articles