pug-php/pug-filter-stylus
Adds Stylus stylesheet support to Pug templates in PHP, so you can write Stylus inside your .pug files and have it compiled automatically. A small filter plugin for the pug-php renderer—install it, register the filter, and keep styles alongside your markup.
Architecture fit. The package positions itself as a drop-in view engine for Laravel's View subsystem, registering a Pug compiler alongside the default Blade engine via the framework's engine resolver. That is a well-trodden extension point, so architectural fit is good: .pug templates coexist with .blade.php without fighting the framework, and no core patching is required. The trade-off is that it adds a second templating dialect to the codebase, which is a team-standardisation decision more than a technical one.
Integration feasibility. Expect the standard Laravel package footprint — Composer install, auto-discovered service provider, publishable config, and a compiler cache directory. Integration effort is low for a greenfield feature area and moderate for an existing app, since the work is really about deciding where Pug is permitted (e.g. marketing pages or email templates) versus leaving existing Blade untouched.
Technical risk. The entirety of the 2.1.0 signal is "Pug-php 3 compatibility." That is a major-version alignment with the upstream compiler, which is the highest-risk class of change for a thin wrapper package: the wrapper's own API may be unchanged while the behaviour of the underlying compiler shifts. Specific risks to close out before adoption:
composer.lock rather than trusting the one-line note.Key questions.
composer.json constraints?Stack fit. Clean fit for any Laravel application on a currently supported PHP line. The main gate is the PHP floor introduced by pug-php 3 — verify against the target runtime before committing, as this is the single most likely blocker and it is cheaper to discover from composer why-not than from a failed deploy.
Migration path. Two distinct paths, and they should not be conflated:
.pug view, verify render + cache behaviour, then widen scope. Low risk.composer update on the package and its upstream only, clear the compiled-view cache, then render every existing Pug template in a smoke test and diff the HTML output. Whitespace and escaping diffs are the expected failure surface.Compatibility. Confirm three axes independently: (a) Laravel framework version supported by the package, (b) PHP version required by pug-php 3, (c) any other Laravel packages that register view engines or hook the compiler. Also check whether the package's config file schema changed between the previous and current minor line, since published config files are a common silent-breakage vector after a major upstream bump.
Sequencing.
Maintenance. The package is a thin adapter, so most of the maintenance burden actually sits with the upstream compiler. The recurring cost is version-chasing: every pug-php major release forces a corresponding package release, and there is a window where the two are out of step. Budget for periodic dependency reviews rather than assuming the package is inert.
Support. Expect community-level support — GitHub issues, no commercial backing. For a templating layer that touches every rendered page, that is a real consideration. Document internal ownership explicitly; do not let it become an unowned transitive dependency.
Scaling. Runtime compilation is the thing to measure. Compiled-template caching makes steady-state rendering cheap, but cold caches, deploys that clear the cache, and per-request compilation on uncached templates all create latency spikes and CPU burn under load. If Pug is used on high-traffic paths, precompile at build/deploy time and treat the cache directory as a deploy artefact rather than a runtime warm-up target. The filesystem cache also needs to be shared across horizontally scaled instances — a per-container cache means every instance compiles independently.
Failure modes.
Ramp-up. Developers coming from Node/Pug transfer immediately; developers who only know Blade need real ramp-up time on Pug's indentation-sensitive syntax and mixin model, and its error messages are generally less friendly than Blade's. The practical mitigation is to scope Pug to a bounded area with a small, stable template set rather than making it the default engine, which keeps the blast radius of both syntax mistakes and compiler upgrades contained.
Verdict on 2.1.0. The release is a compatibility alignment, not a feature release. It is worth adopting — staying on a pug-php 2 constraint creates a growing upgrade debt and an eventual dead end — but the one-line note is not sufficient evidence to approve it. Request the full diff and changelog, confirm the PHP/Laravel matrix, and gate adoption on a template-corpus render test.
How can I help you explore Laravel packages today?