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 rendered in the browser.
It will be hard to debug the JS issues when the minifier is enabled. If you want to disable the minification of JS and CSS resouces which are included in the Portlet Views you can set the below attribute in the portal-ext.properties. Restart the server to take effect.
minifier.enabled=fasle
Disabling minification of JS and CSS during page load
1. One simple way is to add the &js_fast_load=0&css_fast_load=0&strip=0 to the page URL for which you want to see all the JS and CSS files being used.
2. Second one is via portal-ext.properites.
javascript.fast.load=false
By default minification is enabled at portlet level and portal level. For some reason if it is not happening changing the value of "false" to "true" will work.
Thanks
Comments