Skip to main content

Posts

Showing posts from 2019

Disabling and Enabling Minfying of JS and CSS resources in Liferay

   Disabling minification of JS and CSS The minifiation and comibing all the JS and CSS resources is done at two levels or at two places. 1. First are the JS and CSS files which you have included in the portlet JSPs i.e by header portlet css or header portlet js flies or the script tags which you have included in the JSP files 2. Second JS and CSS files are the ones which Liferay uses like, jquery, lodash, alloy ui and all these resources also gets minfied and bundled into one JS or CSS file and loaded in a single HTTP call. Now there are two scenarios one is if you want to debug the Javascript code you have included in the Portlet View JSP, and the other one is when you load a page and you wan to see all the individual JS and CSS files getting loaded instead of a single mindifed bundle. Disabling minification of JS and CSS in portlet view JSPs When you include any JS files or CSS files inside the portlet jsps, by default they get minified when the JSP is rende...