Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

laravel vue, how to npm run serve

Hello , I'm used on vueJS when work on it to type npm run serve and once I change something it will automatically applied on the browser,

But in laravel I dont see that ! should I every time when I make any change to run : npm run development ???

is there any other solution ?

thanks

0 likes
4 replies
munazzil's avatar

This is used in development and you have to build using npm run dev evertime.

1 like
Cruorzy's avatar
Cruorzy
Best Answer
Level 14
mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css')
   .browserSync(process.env.APP_URL);

Then run npm run watch

Or replace the process.env.APP_URL by the ip or something.

1 like

Please or to participate in this conversation.