a-r-m-i-n / min

TYPO3 CMS extension "min" - Compressed CSS, JS and HTML output for TYPO3
6 stars 8 forks source link

Option to disable compression for single asset #13

Open Patta opened 1 year ago

Patta commented 1 year ago

If possible, it would be great if an option/argument for the asset.script viewhelper could be implemented that disables compression of a single asset.

E.g.: <f:asset.script identifier="myScript" src="EXT:sitepackage/Resources/Public/JavaScript/myScript.min.js" compress="false" />

why: some js plugins like "tablefilter js" need a relative "base_path" to their additional resources, which could be wrong if compression is enabled.

Patta commented 1 year ago

I found a workaround with the base_path, but it seems that the tablefilter-min.js.gzip file is empty if compression is enabled.

a-r-m-i-n commented 1 year ago

Hi. Thanks for your suggestion. I can not extend the Asset ViewHelpers without using a XCLASS.

But I could add a new option to plugin.tx_min.assetCollector, like excludeCssIdentifier , excludeInlineCssIdentifier, and same for JS. There, you can define the asset identifiers to not get compressed. Would this work for you?

Patta commented 1 year ago

That would be a great feature. Many thanks in advance.