title: Liferay 6.1.20 : Minimize and bundle theme Javascript
body: <p>Is there a way to apply Liferay's built-in javascript minimizing and bundling capability to the javascript I've included in my theme?  I have <code>javascript.fast.load=true</code> in portal-ext.properties and Liferay's javascript is getting bundled &amp; minified in everything.jsp as expected. Also, all portlet javascript that is included via a portlet's liferay-portal.xml file is getting minified as expected.  However, I've got many javascript files that are included in my theme because they are utilized on every page and I would like them to get minimized and bundled into <code>everything.jsp</code> along with all the Liferay portal javascript. I've tried the approach suggested by <a href="https://stackoverflow.com/questions/16540178/liferay-concatenate-and-compress-javascript">this question</a>, but I think this will only work with a hook because the MinifyFilter will look for files to minify &amp; bundle within the context of the portal web app, i.e. <code>&lt;TOMCAT&gt;/webapps/ROOT</code>. Is there a way I can specify a path to files in a different web app (the theme in this case) as the <code>javascript.bundle.dir</code> parameter? In other words, something like <code>javascript.bundle.dir[javascript.jquery.files]=/&lt;theme-path&gt;/js</code>.  I've tried many variations and combinations of <code>javascript.bundle.ids</code>, <code>javascript.bundle.dependencies</code>, etc. to no avail.  I know I can get around the problem by putting the javascript in a hook or putting it in portlet and embedding it in the theme but I'd really like to just keep the javascript in the theme.  Is there a reasonable way to accomplish this?</p>