how to use node modules in laravel code example

Example 1: laravel modules

php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"

Example 2: how to use node modules in laravel

mkdir my-app && cd my-app
npm init -y
npm install laravel-mix --save-dev
cp node_modules/laravel-mix/setup/webpack.mix.js ./

Example 3: laravel modules

composer require nwidart/laravel-modules

Example 4: laravel modules

{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/"
    }
  }
}