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

[AssetMapper] Add minification since deprecated by cloudflare #54964

Closed
ChristianVermeulen opened this issue May 17, 2024 · 2 comments
Closed

Comments

@ChristianVermeulen
Copy link

Description

Asset-Mapper has made a clear choice to not minify assets and move this responsibility to the webserver. Mainly referring to CloudFlare who can do this automatically.

Documentation: Does the AssetMapper Component Minify Assets?

Which refers to Optimization.

Which states the following:

In Cloudflare, assets are compressed by default and you can also enable auto minify to further compress your assets (e.g. removing whitespace and comments from JavaScript and CSS files).

Going to those Cloudflare docs, it seems the auto-minify feature is deprecated:

Deprecation notice
Auto Minify is deprecated and will be removed on 2024-08-05. After this date, Auto Minify will no longer be available via the Cloudflare dashboard, API, or Terraform.

We recommend that you minify at the origin during the build phase. Minification is included in most modern web development frameworks.

Considering Cloudflare will no longer support it, ánd advises to do this at build-time, it might be worth reconsidering this and perhaps add minification to AssetMapper after all?

Example

This could simply be toggled in config, though it would probably be best to have this behaviour by default.

when@dev:
    framework:
        asset_mapper:
            minify: false

when@prod:
    framework:
        asset_mapper:
            minify: true
@ChristianVermeulen ChristianVermeulen changed the title [Asset-Mapper] Add minification since deprecated by cloudflare [AssetMapper] Add minification since deprecated by cloudflare May 17, 2024
@Nek-
Copy link
Contributor

Nek- commented May 21, 2024

This looks like a duplicate of #54907

@derrabus
Copy link
Member

This looks like a duplicate of #54907

Indeed.

@derrabus derrabus closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
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

4 participants