Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Minify Laravel Package

fahlisaputra/laravel-minify

A Laravel middleware package that minifies HTML, CSS, and JavaScript responses on the fly. Reduce page size and improve load times with simple configuration, optional caching, and support for custom minifier drivers—no build tools required.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Roadmap: framework upgrade readiness. The only change in v1.2.4 is declared Laravel 13 compatibility. That is not a feature — it's a maintenance signal. It lets you keep the package in the dependency graph when the Laravel 13 upgrade lands, instead of scoping removal work into the upgrade epic.
  • Build vs buy: default to buy (i.e. keep the package). The capability is a single HTML-response minifying middleware. Rebuilding it in-house is a day of engineering plus permanent ownership of edge cases (inline <script>/<style>, <pre>/<textarea>, whitespace-sensitive attributes, Blade output quirks). Keeping a small, maintained package is the cheaper option as long as it tracks Laravel releases — which this release confirms it does.
  • Performance / SEO incremental wins. Response-size reduction on HTML routes gives a small, low-risk improvement to transfer time and Core Web Vitals-adjacent metrics. It is a garnish, not a strategy: treat it as a cheap default-on for server-rendered pages, never as the headline of a performance initiative.
  • Go/no-go gate for the Laravel 13 upgrade. Because the package sits in the HTTP kernel path, an incompatible version is a hard blocker on the upgrade (it can break every HTML response). This release clears that gate — that is the decision it actually unblocks.
  • Scope boundaries. It applies only to server-rendered HTML. It buys nothing for JSON APIs, Inertia/SPA front ends, or asset pipelines. Do not let it appear on a roadmap as a performance workstream; it belongs in platform hygiene.
  • Risk register / dependency review. A package on the response path with a single maintainer is a supply-chain and bus-factor item. A prompt Laravel 13 release is evidence of active maintenance — record it, and re-check at the next major framework bump.

When to Consider This Package

Adopt when:

  • You ship server-rendered Blade HTML and want a low-effort payload reduction without touching templates or the asset build.
  • You have no edge minification already (no Cloudflare Auto Minify, no nginx/CDN HTML post-processing) — otherwise you risk double-processing with no measurable gain and a harder debugging story.
  • You need route-level control (enable in production, disable in local, exclude specific paths or admin/API routes) — config-driven opt-out is the main reason to prefer a package over a hand-rolled middleware.
  • Your Laravel upgrade cadence is the constraint: you want a dependency that declares support for the next major version before you get there.

Look elsewhere or skip when:

  • HTML minification is already handled at the edge or in the web server — adding it in-process duplicates work and complicates incident triage.
  • Your pages are whitespace-sensitive by design, or you rely on libraries that are fragile to whitespace/attribute reflow (rich-text editors, <pre>-heavy docs, templating with meaningful newlines). Budget real regression testing before enabling globally.
  • You need a strict Content-Security-Policy and any rewriting of inline scripts/styles is unacceptable.
  • Your application is API-first or an SPA shell — there is nothing meaningful to minify.
  • You require vendor SLAs, security review artifacts, or a multi-maintainer project: a single-maintainer utility on the response path may not clear procurement, however well maintained.

Adoption gate for this release specifically: pin to v1.2.4 only as part of the Laravel 13 upgrade branch, run the HTML-diff regression suite across high-traffic and edge-case views, and verify behavior with any inline-script-heavy pages before promoting to production.

How to Pitch It (Stakeholders)

For executives (30 seconds): This is a small, low-cost utility that trims bytes from every server-rendered page, giving a modest speed and bandwidth improvement. The new release matters less for what it adds than for what it prevents: it confirms the library keeps pace with Laravel, so our upcoming framework upgrade isn't blocked by an unmaintained dependency. Cost is near zero, risk is contained by config flags and route exclusions, and it is not a substitute for real performance investment.

For engineering leads: v1.2.4 is a compatibility-only release — Laravel 13 support, no API or behavioral changes, no deprecations, no migration work. Treat it as a routine version bump and use it as the trigger to schedule the Laravel 13 upgrade validation. Because the middleware sits on the response path, an incompatible version fails loudly across all HTML routes, so gate the upgrade on it rather than discovering it mid-rollout. Before enabling broadly, confirm no edge/CDN minification is already active, exclude API/admin routes and any whitespace-sensitive views, and add a golden-file HTML diff test so future bumps are validated mechanically rather than by eyeballing pages.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings