- What is leuverink/bundle used for in Laravel?
- Bundle is a Laravel package for organizing page-specific JavaScript modules in Laravel and Livewire Blade apps. It provides a Laravel-native API and sensible defaults for packaging related code, assets, and configuration into reusable bundles. Treat it as an organizational or build-time layer rather than core runtime architecture.
- How do I install leuverink/bundle with Composer?
- Install it as a Composer dependency with composer require leuverink/bundle, then follow the repository README for any publish, build, or asset setup steps. Check whether your app needs a JavaScript build step or service provider configuration. Validate the integration in a non-critical app before rolling it out broadly.
- Does Bundle work with Laravel Livewire?
- The package description explicitly targets Laravel and Livewire apps, so it is intended to support page-specific JavaScript alongside Livewire views. You should still verify compatibility with your Livewire major version and your asset build pipeline. Test Livewire navigation and component updates to confirm modules load as expected.
- Which Laravel and PHP versions does leuverink/bundle support?
- The provided context does not list exact Laravel and PHP version constraints, so inspect the package composer.json and README before adopting it. Pin supported PHP, Laravel, and Composer platform settings in your CI matrix. Avoid assuming compatibility with your production versions until you have tested them.
- Is Bundle a runtime package or a build-time tool?
- Bundle is best treated as a build-time packaging and organization layer for related code, assets, and configuration. It should not be the default foundation for standard HTTP workloads, Octane-style services, or systems with heavy native-extension needs. Keep runtime Laravel concerns such as queues, storage, logging, and secrets management in your normal application architecture.
- How should I structure page-specific JavaScript with Bundle?
- Co-locate page-specific modules with the Blade or Livewire pages they support, and keep shared utilities in a separate common bundle. Register modules through the package API described in the README and let your build step produce the final assets. Test each page in isolation and after Livewire navigation to catch missing or duplicated modules.
- Can I use leuverink/bundle in production?
- It can be considered for low-risk internal tools or a limited pilot, but the package shows early-stage signals such as low adoption and a single 2024 release. Keep your existing deployment path active and validate asset resolution, configuration caching, writable paths, and rollback before production use. For customer-facing apps, require a pilot to prove parity with your current release process.
- How do I test a Bundle integration in Laravel?
- Add smoke and functional tests for Blade pages, Livewire components, asset resolution, and build output. Run the tests in CI across your target PHP and Laravel versions, including config cache and read-only filesystem scenarios. Also compare startup or build time, observability, and rollback behavior against your existing process.
- What are alternatives to leuverink/bundle?
- Common alternatives include Laravel Vite, Laravel Mix, Livewire asset directives, and custom Blade or module loaders. Compare maturity, maintenance activity, documentation, and support before choosing. Bundle is specifically aimed at page-specific JavaScript modules and reusable bundles in Laravel and Livewire apps.
- How is leuverink/bundle maintained and supported?
- The package is MIT licensed and support is expected through GitHub issues rather than a vendor SLA. The context shows 53 stars, zero dependents, and a last release on 2024-10-24, so track upstream activity and be prepared to pin, patch, or fork. Document internal ownership and an exit plan before using it in critical paths.