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

Less Laravel Package

nodejs-php-fallback/less

Compiles LESS to CSS from PHP, using Node.js lessc when available and falling back to a pure-PHP compiler when it isn’t. Ideal for Laravel/PHP asset pipelines that need reliable LESS builds without a mandatory Node.js dependency.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy — asset pipeline placement. The core decision this package informs is where LESS→CSS compilation happens: in Node (via the less npm CLI) or inside PHP. This wrapper exists specifically to defer that decision to runtime by trying Node first and falling back to a pure-PHP compiler. That's an architecture decision, not a feature.
  • Deployment target / hosting constraints. Whether the product can ship to environments without Node.js (shared hosting, locked-down PaaS, some managed hosts, minimal CI images) is a real product constraint. This package is a portability hedge, not a capability.
  • Roadmap input: toolchain modernization. Its most defensible use is as a transitional dependency while a legacy PHP/Laravel app migrates to a modern bundler (Vite, or a Node build step in CI). Frame it as a line item in a migration plan, never on the roadmap as a feature.
  • Risk register / dependency policy. With 4 stars, 0 dependents, last release January 2019, and a low opportunity score, this is a textbook "unmaintained dependency" entry. It informs your supply-chain hygiene policy and how much duplication/tolerance you accept in build tooling.
  • Runtime vs. build-time compilation tradeoff. Runtime fallback compilation affects latency, error surfacing, and ops burden. The package makes "compile on demand" easy, which is usually the wrong default — precompiled CSS in CI is safer and faster.
  • Not a differentiator. Zero user-facing impact. It should never justify scope, headcount, or a launch decision; it is internal plumbing with a shelf life.

When to Consider This Package

Consider it only when all of the following hold:

  • You maintain a legacy PHP/Laravel app that already compiles LESS, and rewriting the asset pipeline is out of scope for the current cycle.
  • Production hosts cannot guarantee Node.js, but dev/CI can — so you need one code path to work in both.
  • You are running a bounded migration (weeks, not quarters) and want to avoid a big-bang toolchain switch.
  • You can tolerate an unmaintained dependency: you'll pin the version, wrap it behind your own interface, and record a removal date.

Look elsewhere when:

  • Greenfield work. Use Vite (with Laravel's first-party Vite plugin) and Dart Sass/PostCSS. Do not introduce a 2019 wrapper with 0 dependents.
  • Node is guaranteed in build environments. Invoke lessc directly in your build script — the wrapper adds a dependency and a failure mode for no gain.
  • You need maintenance, security patching, or vendor support. There is effectively no upstream velocity here; the fallback PHP compiler it delegates to is where CVEs would land, so verify which compiler it uses and whether that is maintained.
  • Request-time performance matters. Precompile in CI/CD; don't compile on request.
  • You are questioning LESS itself. LESS is a shrinking ecosystem relative to Sass/PostCSS. Adopting a LESS compiler in a new project is a decision worth challenging before you evaluate the wrapper around it.

How to Pitch It (Stakeholders)

Executives (one paragraph): "This is small plumbing, not a product capability. It lets a PHP application compile LESS stylesheets without requiring Node.js on production servers — valuable only if we have a legacy app running on a constrained host. It is effectively unmaintained (last release 2019, no downstream dependents), so we should not adopt it for new work. At most it's a temporary bridge with a dated exit plan; the strategic direction is a standard Node-based build (Vite + Sass), which we already recommend for new projects."

Engineering (summary): "It wraps the less npm package and falls back to a pure-PHP LESS compiler when Node isn't present. That buys environment portability at the cost of two divergent compiler paths — output can differ subtly and debugging spans two toolchains. If we use it: pin the version, hide it behind our own asset-compiler interface, ensure CI exercises the Node path so at least one branch is tested, confirm the PHP fallback's maintenance/CVE status, and attach a removal ticket. MIT license, so no legal friction. For anything new, skip it: Vite plus Dart Sass, compile in CI, ship static CSS."

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