Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable compression for single asset #13

Open
Patta opened this issue Sep 5, 2022 · 3 comments
Open

Option to disable compression for single asset #13

Patta opened this issue Sep 5, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@Patta
Copy link

Patta commented Sep 5, 2022

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
Copy link
Author

Patta commented Sep 6, 2022

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
Copy link
Owner

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?

@a-r-m-i-n a-r-m-i-n added the enhancement New feature or request label Sep 6, 2022
@Patta
Copy link
Author

Patta commented Sep 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants