Skip to content

Build ​

Build Modularous Vue assets with custom components, themes, and Inertia pages.

Command Information ​

  • Signature: modularous:build
  • Alias: build:modularous
  • Category: Assets

Options ​

OptionDescription
--noInstallSkip npm ci and reuse existing dependencies
--hotStart the Vite dev server with hot reload
-w, --watchRun the asset watcher
-c, --copyOnlyCopy custom components/pages/themes without building
--copyComponentsCopy only custom Vue components
--copyInertiaPagesCopy only custom Inertia pages
--copyThemeCopy only the selected custom theme styles
--copyThemeScriptCopy only the selected custom theme script
--theme=Theme name when using copy-theme options

What It Does ​

  1. Installs npm dependencies in the Modularous Vue package (unless --noInstall).
  2. Publishes and copies custom components, Inertia pages, and themes from the host app and modules.
  3. Runs npm run build, npm run dev, or npm run watch depending on the selected mode.
  4. Calls modularous:refresh after a production build to republish compiled assets.

Examples ​

bash
php artisan modularous:build
php artisan modularous:build --hot
php artisan modularous:build --watch
php artisan modularous:build --copyOnly
php artisan modularous:build --copyTheme --theme=my-theme
  • refresh — republish compiled assets to public/vendor/modularous
  • ModularousVite — how published assets are loaded in Blade