简体   繁体   中英

How to use npm run watch and php artisan serve together through the command prompt?

I enter npm run watch first and then then I can't enter php artisan serve . Is there a way I can use them in the same command?

Thanks

打开两个终端并在其中输入 npm run watch ,准备就绪后在另一个终端中运行 php artisan 。

If this helps anyone, npm run hot works correctly with Laravel 8 and Vue 2. I'm using built-in Vue scaffolding of Laravel UI (and not a separate Vue CLI project).

Just use php artisan serve to serve your Laravel application and then open a new terminal window and run npm run hot . Now the browser output will update automatically when you make changes to your Vue components.

Make sure your webpack.mix.js contains the .vue() call in its chain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM