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

Assetic Laravel Package

sanpi/assetic

Laravel integration for the Assetic asset management library. Define CSS/JS asset collections, apply filters such as LESS, Sass, CoffeeScript and minification, then dump and serve compiled, cached assets via Blade helpers for a simple PHP asset pipeline.

View on GitHub
Deep Wiki
Context7

Asset Management for PHP

Frequently asked questions about Assetic
What is sanpi/assetic and what does it do in Laravel?
sanpi/assetic is a Composer library that wraps the Assetic asset management library for Laravel projects. Its overview describes config-defined CSS and JavaScript collections that can be combined, filtered through tools such as LESS, Sass, CoffeeScript, and minifiers, then dumped and served via Blade helpers. Technical review notes that it is not a conventional Laravel package, so expect to own the service provider and manifest glue yourself.
How do I install sanpi/assetic in a Laravel project?
Install it with Composer, for example composer require sanpi/assetic, and pin the exact version or commit you validate. Check that its symfony/process and symfony/filesystem constraints resolve against the Symfony components already pinned by your Laravel version. Because it is a library rather than a full Laravel package, installation usually includes writing a service provider or build script around it.
Is sanpi/assetic compatible with Laravel 10 and Laravel 11?
There is no verified Laravel 10 or Laravel 11 support statement, and PHP 8.x compatibility has not been validated in the wild. The main compatibility hazard is Composer conflict with Symfony 6 or 7 components that Laravel already pins. Run a Composer resolution spike and an asset build in CI before assuming it works on your target Laravel version.
How do I define asset collections and render them in Blade?
Collections are described as configuration entries that group stylesheets and JavaScript under logical names, with Blade helpers mapping those names to built files. In practice, the package does not ship a conventional Laravel service provider, facade, config publishing step, or Blade directive, so you should plan to write that integration glue. The safer design is to generate a manifest of hashed outputs and expose one thin helper that the application uses at runtime.
Which filters can I use for LESS, Sass, CoffeeScript, and minification?
The package advertises pluggable filters for preprocessing LESS, Sass, and CoffeeScript plus minification. Those filters typically shell out to external binaries such as lessc, sass, or uglify-js, so availability and version drift in your CI and deploy images matter. Verify each required binary is installed and maintained before committing to this pipeline.
Does sanpi/assetic compile assets at build time or on every request?
Compilation should be strictly build-time: run the Assetic dump step in CI and emit content-hashed files into a public build directory. Do not instantiate Assetic classes or run filters per request, because that creates latency and availability risk. The application runtime should only read a generated manifest or helper output.
How does caching and cache busting work with sanpi/assetic?
The overview describes compilation with caching and cache busting for production-ready output. The practical contract should be content-hashed filenames plus a manifest that maps logical collection names to hashed paths. That keeps browser caching effective while avoiding stale asset references after deploys.
Is sanpi/assetic a replacement for Laravel Vite or Laravel Mix?
No. Laravel's sanctioned asset path is Vite with laravel-vite-plugin and @vite, with Laravel Mix as the legacy fallback. sanpi/assetic sits outside both and is best treated as a compatibility shim only when porting an existing Assetic configuration. For greenfield or actively developed Laravel services, Vite already covers bundling, minification, hashed manifests, and HMR with first-party support.
What production risks should I consider before adopting sanpi/assetic?
The risk is high: upstream Assetic is end-of-life, this fork patches an abandoned base, and it has a single maintainer with no security advisory channel. It also has zero stars and zero dependents, so there is little downstream production evidence to rely on. Add Composer conflicts with Laravel's Symfony pins, filter binary drift on CI images, and an unverified PHP 8.x path to the risk register.
How should I test and maintain a sanpi/assetic integration?
Start with a spike that proves Composer resolution, installs every required filter binary, and runs the dump step in CI against your target PHP and Laravel versions. Add integration tests that build fixtures and assert the manifest maps logical names to hashed files. Assign a named owner and a dated exit criterion to migrate to Vite, and pin the fork version or commit so builds are reproducible.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo