- What is etrepat/basset and what does it do in Laravel?
- Basset is a Laravel-native asset management package that collects, compiles, combines, and minifies CSS and JavaScript. It supports preprocessors such as LESS, SCSS, CoffeeScript, and Stylus, groups assets into named collections, and serves live-compiled assets in development or pre-built static files in production via a service provider, facade, and Artisan commands. It is a conventional Laravel package, but its Laravel 4/5-era constraints make it a legacy choice.
- Is etrepat/basset compatible with Laravel 9, 10, or 11?
- Basset targets the Laravel 4/5 era, and its service-provider registration predates auto-discovery and modern PHP conventions. Any use on Laravel 9+ should be assumed to require a fork that bumps Composer constraints and replaces stale compilers. Validate with a compatibility matrix covering Laravel, PHP, compiler versions, and any OS-level binaries.
- How do I install and configure Basset in a Laravel app?
- Composer-require a pinned version or a maintained fork, publish the config file, and explicitly register the service provider and facade because the package predates Laravel auto-discovery. Then define collections and run basset:build in staging before production. Do not assume current Composer constraints will resolve on modern Laravel or PHP without testing.
- Does Basset support LESS, SCSS, CoffeeScript, and Stylus?
- Basset compiles LESS, SCSS, CoffeeScript, and Stylus into CSS or JavaScript, and it can combine and minify the resulting assets. The important caveat is that its compiler dependency chain is legacy and itself stale, so compatibility and security need review. Confirm the exact compiler versions and any OS-level binaries required for your environment.
- What are Basset asset collections and named assets?
- Basset groups CSS and JavaScript into named collections, so you can reference a logical asset group instead of individual files. It compiles and combines those collections, minifies the output, and exposes cache-friendly URLs for serving the results. Collections are also useful as a reference model if you later migrate to Vite or Mix.
- What is the difference between basset:build, basset:compile, and basset:clean?
- Basset provides Artisan commands including basset:build, basset:compile, and basset:clean. In a typical workflow, build prepares production assets, compile compiles configured collections, and clean removes generated or cached output. Confirm exact behavior against the pinned version or fork you deploy.
- Is Basset safe to use in production?
- Treat it as material risk. It is unmaintained, its LESS/SCSS/CoffeeScript compiler dependencies are stale, and request-time compilation in development can expose path traversal, arbitrary file read, or build-directory write issues if misconfigured in a reachable environment. Build output correctness also becomes a deploy-time gate, so validate in a sandbox and CI shadow build before production, and prefer Vite or Mix for current projects.
- How does Basset compare to Laravel Mix and Vite?
- Basset is a PHP-side asset pipeline for legacy Laravel monoliths that have no Node toolchain or bundler; Mix and Vite are the modern Node-based answers for greenfield and mid-life projects. Use Basset only as a migration source or reference for collection definitions, not as a new addition.
- Can I use Basset without Node.js or a frontend bundler?
- Yes, Basset is designed to collect, compile, combine, and minify assets from within Laravel using PHP and its compiler dependencies, so it can fit a legacy monolith with no Node build step. However, its compiler chain is legacy and some preprocessors may still rely on non-PHP binaries or OS-level tooling. Prove the exact dependency tree and binary requirements for your target Laravel and PHP versions before adopting it.
- Is etrepat/basset still maintained, and what are the alternatives?
- No. The package is effectively dormant: it has about 14 stars and a 0.23 score, targets the Laravel 4/5 era, and has no upstream security patches. Treat it as an internal fork on day one, with clear ownership for constraint bumps, compiler upgrades, and CVE triage. For alternatives, use Laravel Vite or Mix unless you are preserving a legacy PHP-only pipeline.