Download the PHP package alizharb/laravel-modular-js without Composer
On this page you can find all versions of the php package alizharb/laravel-modular-js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alizharb/laravel-modular-js
More information about alizharb/laravel-modular-js
Files in alizharb/laravel-modular-js
Package laravel-modular-js
Short Description The official JavaScript bridge for Laravel Modular offering automatic discovery and modular component resolution for Vue, Nuxt and React.
License MIT
Informations about the package laravel-modular-js
Laravel Modular JS 🚀
Laravel Modular JS is the official JavaScript bridge for Laravel Modular. It provides first-class support for modern frontend frameworks (Vue, React, Nuxt.js) within a modular architecture.
✨ Features
- 🏗️ Modular Artisan Command: Enhanced
modular:jscommand with--modulesupport. - ⚛️ Vue, React & Nuxt Support: Generate components for your preferred frontend framework.
- 🔍 Automatic Discovery: Built-in resolution for modular components (Inertia.js & Nuxt).
- 🧭 Native Generation: Uses package-owned generator templates without publishing application stubs.
- 🩺 Diagnostics Ready: Designed to work with Laravel Modular 1.2
modular:doctor,modular:status, andmodular:debug. - 🤖 Laravel Boost Support: Ships Boost guidance so agents understand modular frontend conventions.
- ✅ Strictly Typed: Compatible with Laravel 11/12/13 and PHP 8.2+.
🚀 Installation
Install the package via Composer:
📖 Usage
Generating Modular Components
Use the modular modular:js command to generate components inside your modules. You can optionally generate a matching controller with the --controller or -c flag.
- Vue Path:
modules/Blog/resources/js/Pages/Post/Index.vue - React Path:
modules/Blog/resources/js/Pages/Post/Show.jsx - Nuxt Path:
modules/Blog/resources/js/components/Shared/Button.vue - Controller:
modules/Blog/app/Http/Controllers/Post/IndexController.php(if requested)
🔗 Framework Integration
1. Inertia.js (Vue & React)
Inertia requires a Resolver to map modular component names (e.g., Blog::Post/Index) to physical files. This package provides a helper you can use in your app.js.
Vue 3 / React Example (resources/js/app.js)
2. Nuxt.js
Nuxt uses auto-importing, so it does not need a runtime resolver. Instead, you simply tell Nuxt to look for components in your module directories via nuxt.config.ts.
Nuxt Configuration (nuxt.config.ts)
🧭 Native Generation
Laravel Modular JS intentionally does not publish application stubs. The command generates clean Vue, React, and Nuxt entry points from package-owned templates so projects stay aligned with package updates and do not accumulate stale stub copies.
After changing module frontend structure, run:
📦 Related Packages
- Laravel Modular - The core modular system.
- Livewire Integration - Livewire bridge for Laravel Modular.
- Laravel Themer - Theme management, previewing, diagnostics, and design tokens.
🤝 Contributing
Please see CONTRIBUTING for details.
📄 License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Ali Harb
All versions of laravel-modular-js with dependencies
alizharb/laravel-modular Version ^1.2
spatie/laravel-package-tools Version ^1.16