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

Mix Laravel Package

misterbk/mix

A Laravel integration for Laravel Mix that adds helpers and Blade directives to resolve compiled CSS/JS paths from mix-manifest.json, making versioned assets easy to reference and cache-bust without hardcoding URLs in your templates.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

The first finding is a premise correction that materially changes the evaluation: misterbk/mix is not a Laravel package. It is a Craft CMS plugin (Yii2-based, installed via Composer into a Craft project) whose only job is to expose a Twig mix() helper that resolves asset paths from a Laravel Mix mix-manifest.json. It borrows Laravel's front-end build convention, not its framework runtime.

That constrains fit sharply:

  • Fits: Craft CMS 3/4/5 projects using Twig templates and a Laravel Mix (webpack) pipeline for CSS/JS bundling and cache-busting.
  • Does not fit: Laravel applications — Laravel already ships mix() in Blade natively; this package adds nothing there.
  • Does not fit: Craft projects on Vite, which is the direction both Laravel and the Craft community have moved.

So the addressable population is "Craft sites still on Mix." That is a shrinking set, which is consistent with the low opportunity score (19.94) and the 0 dependents.

Integration feasibility

Low effort, small surface area. Roughly:

  1. composer require misterbk/mix
  2. Install the plugin in the Craft control panel or via project config
  3. Configure the manifest path and optional hot-file / asset base URL
  4. Replace hardcoded {{ siteUrl }}/dist/... paths with {{ mix('js/app.js') }}

There is no service layer, no database schema of consequence, no queue jobs, no event surface that a typical project would hook. The plugin is a thin resolver over a JSON file. Integration can be scoped to a single ticket and validated in a dev environment in under a day.

Technical risk

  • Bus factor / stewardship (moderate-high). Single maintainer, 51 stars, 0 dependents. There is no downstream ecosystem pressure to keep it current with Craft releases. Latest release (2025-06-18) suggests it is still being touched, which is a positive signal, but there is no vendor, no SLA, and no commercial backing.
  • Strategic risk from the underlying tool (high). Laravel Mix is effectively in maintenance mode; Vite is the default for new Laravel and has first-class Craft plugins. Adopting this package is a bet on a build tool that is already legacy for greenfield work.
  • Mitigation is cheap. Because the plugin is a thin wrapper, the worst case is a fork of a few hundred lines or a 20-line Twig extension written in-house. This is not a dependency that can trap us architecturally.
  • Abandonment risk is asymmetric but bounded. If the plugin dies, we lose a composer update, not a migration.

Key questions

  • Which Craft major versions are supported, and does the constraint align with our current/pinned Craft version?
  • Does it honor a .hot file for HMR in local development, and does it fail safe when .hot exists in a non-local environment?
  • Can the manifest path and asset base URL (CDN prefix) be configured per environment and per site (multi-site installs)?
  • Does it support multiple manifests (e.g., separate CP and front-end builds)?
  • What are the PHP and Twig version constraints?
  • Is there a documented Vite migration path, or is this a dead-end by design?
  • What happens on a missing key — exception, silent empty string, or fallback? This determines our error-handling strategy.

Integration Approach

Stack fit

Target stack is Craft CMS + Twig + Composer, with an existing webpack.mix.js producing hashed filenames and a mix-manifest.json. If the front end is already on Vite, this package should be rejected outright and a Vite-oriented Craft plugin used instead. If the team is a Laravel shop extending into Craft, the mental model transfers immediately — this is the main reason to consider it at all.

Migration path

Two viable paths, and the choice should be made explicitly rather than by default:

  • Adopt (incremental): Keep the existing Mix build, introduce the plugin, and swap hardcoded asset paths for mix() calls template by template. Lowest disruption; leaves the Vite question for later.
  • Skip (strategic): Go directly to Vite with an established Craft Vite plugin, optionally keeping a mix()-shaped Twig shim so templates do not churn. Slightly higher upfront cost, avoids building on a sunset tool.

Given the low dependents count and the trajectory of Mix, I would default to the second path for any greenfield or actively-developed Craft site, and reserve the first for maintenance-mode sites where the build pipeline is frozen and the only goal is removing hardcoded paths.

Compatibility

Verify against the project's locked Craft, PHP, and Twig versions before committing. Because the plugin touches only the Twig rendering layer, compatibility failures will surface immediately at install or first render rather than as subtle runtime defects — an easy gate.

Sequencing

  1. Confirm Craft/PHP/Twig constraints resolve cleanly in a branch.
  2. Install and configure manifest path + base URL in local dev.
  3. Validate HMR behavior with the .hot file present.
  4. Replace asset references in the base layout first, then propagate to partials.
  5. Add a production deploy check that the manifest exists and .hot is absent.
  6. Decommission the old path-construction helper.
  7. Separately, open a spike ticket on Vite migration so this decision is revisited rather than sedimented.

Operational Impact

Maintenance

Near-zero ongoing effort — the plugin has no moving parts beyond reading a JSON file. The real maintenance burden is the build pipeline, not the plugin. The risk to plan for is a Craft major upgrade where the plugin has not yet been updated; because it is a thin Twig extension, we should assume we may need to patch or fork it ourselves. Budget a small contingency, not a workstream.

Support

Community-only: GitHub issues from a single maintainer. No commercial support, no security advisory process to rely on. Acceptable for a non-sensitive, render-time helper; unacceptable if we were treating it as infrastructure.

Scaling

Effectively free at runtime. Manifest resolution is a file read and array lookup per render; with opcache and sensible manifest caching it will not register in profiling. Static asset delivery is unchanged — CDN and cache headers are governed by the app's asset configuration, not by this plugin. No scaling concerns.

Failure modes

These are the ones worth writing runbooks for, because they are all deploy-time and all user-visible:

  • Stale .hot file deployed to production — templates resolve to localhost:8080, every asset 404s. Highest-severity and most common failure. Needs a CI assertion that .hot is absent from the artifact.
  • Manifest/asset ordering — manifest deployed before or after the hashed files it references produces 404s during the rollout window. Deploy manifest and assets atomically, or accept a brief mismatch.
  • Missing key in manifest — behavior depends on the plugin's error handling; an exception takes down the page, a silent empty string yields broken markup. Determine which, and add a smoke test for the critical entry points.
  • Cache staleness — Craft's template/data caches or opcache retaining an old manifest after deploy. Include a cache clear in the deploy step.
  • CDN base URL misconfiguration — assets resolve to the origin instead of the CDN, or to a non-existent prefix, in one environment only.
  • Plugin abandoned mid-Craft-upgrade — installation blocks the Craft upgrade. Fork-and-inline is the escape hatch.

Ramp-up

Trivial. A developer familiar with Laravel Mix needs minutes; a developer unfamiliar with Mix needs to learn webpack.mix.js, which is the larger cost and is independent of this plugin. Documentation load is one README. This is not a package that requires a training plan — it requires a one-paragraph note in the front-end README explaining where the manifest lives and why .hot must never ship.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console