heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Disable utils bundle js #13

Closed dmolineus closed 3 years ago

dmolineus commented 4 years ago

I have a multi domain setup where only one project uses your teaser bundle. However the utils bundle js is also available in other projects. As the projects don't manage any assets with Contao (assets are loaded by the assets component), the utils bundle js is the only one being injected everythere.

Is there any way to disable it, so that it is only loaded when required?

koertho commented 4 years ago

The JS-Code is added in the contao config file. You could unset the index in the generatePage hook ($GLOBALS['TL_JAVASCRIPT']['contao-utils-bundle']). Another way is currently not implemented, but it's a good point to make this configurable. We use our encore bundle and don't have to deal with such things ;)

dmolineus commented 4 years ago

Thanks for your replay. Killing the file with a custom hook listener is what I already do.

koertho commented 3 years ago

@dmolineus In Version 2.187 there is now an option to disable the assets. So you could replace your hook with the config. Sorry that it took so long!