Support the ongoing development of Laravel.io →
Spark Configuration Views

Hello,

I have set up spark and now I want to work with my custom vue component. I'm using the /resources/js/components/home.js for example. And to be able to display my updates I have to run npm run dev every time. It's super annoying to have to wait every 5 mn.

I'd like to know what is the solutions to be able to see the updates just by refreshing the page. When I've follow the Laracast series about vue it didn't need compilation.

Cheers

Last updated 2 years ago.
0

npm run watch

0

-> normykins is correct. Running npm run watch should compile your assets when you save a file like scss or js.

You should consider installing these via your npm

        "browser-sync": "^2.24.4",
        "browser-sync-webpack-plugin": "^2.0.1",

then in your webpack.mix.js you can add a line.

mix.browserSync('yourlocalwebsite.url');

this will trigger a browser refresh when you save a file

0

Thank you guys, that's exactly what I needed !

0

@shimabukuro did you get it all setup with browser reloading?

I noticed it may come out of the box with 5.6 / 5.7 https://laravel.com/docs/5.6/mix#browsersync-reloading

0

@Cameron Yes it was already setup in spark. I just had to run npm run watch.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

shimabukuro shimabuk Joined 20 Sep 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.