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

Do not override global config.compress* and config.concatenate* #15

Open
LeoniePhiline opened this issue Sep 23, 2022 · 4 comments
Open

Comments

@LeoniePhiline
Copy link

LeoniePhiline commented Sep 23, 2022

The current version (v2.1) overwrites global configuration config.compress* and config.concatenate* which might often be against the interest of the user, as today's assets are mostly bundled, minified and prepared for long-term caching strategies by other tools.

The documentation already contains the hint to add these yourself: https://docs.typo3.org/p/t3/min/2.1/en-us/Configuration.html#asset-compression-css-js

Including modifications to global config { ... } together with other, plugin-specific configuration makes it cumbersome to handle complex configuration trees, where global config is, among other basic settings, configured before extension configuration is included.

I would propose either removing the config section from the extension TypoScript configuration entirely, or splitting it off into a separate, includable static TypoScript file.

PS: As website author / extension user, not including the provided TypoScript configuration is not a good option either: This raises the maintenance burden, as all relevant non-config settings need to manually be kept in sync when extension updates introduce new or change existing settings.

@a-r-m-i-n
Copy link
Owner

Hello @LeoniePhiline,
thanks for your response and your proposal.

The documentation part you've referenced to, basically describes, what you get, when you include the static TypoScript template of EXT:min. Now, you have the ability to include the TypoScript manually. In earlier versions, this TypoScript config has been applied always, automatically.

So, when you include the static TypoScript, you probably expect the extension to be enabled. And to do so, I have to add the config.compress* and config.concatinate* options.

I don't see the need to outsource the config. settings to a seperate static include file.
What would be the benefit?

Maybe the documentation should get adjusted instead. What do you think?

@LeoniePhiline
Copy link
Author

Hi! Thanks for your response!

The benefit would be that integrators can use the HTML minification feature provided by the extension, without being forced to also use the asset compression and concatenation.

These are distinct features, and should be enabled using two distinct TypoScript includes.

It is quite common to build, bundle and minify assets with tools like parcel, vite, esbuild, webpack etc.

Users of these tools only want html minification, but their (already optimized) assets left untouched.

Users of these tools are not going to want an extension fiddling with global config settings. ;)

I hope you can consider splitting the two features (html minification vs assets minification) into two separate TypoScript includes. :)

In any case, I found your extension very useful. Thank you for publish it!

@a-r-m-i-n
Copy link
Owner

Ahh, I understand. One TypoScript file for asset compression and one for source code (formerly known as tinysource). This makes sense to me and indeed makes it easier to just use one of those features.

Let me think a bit about it...

@LeoniePhiline
Copy link
Author

I'd greatly appreciate it. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants