1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Laravel sail NPM vite run dev not updating vue files

Discussão em 'Outras Linguagens' iniciado por JI-Web, Março 25, 2025.

  1. JI-Web

    JI-Web Guest

    Depending on where I run #npm run dev from the auto/hot changes are not reflected. A restart of dev is required to view the new vue files.

    Setup: Laravel 11 + inertia + Vue3 - Windows using WSL

    Env: Running Laravel Sail visible in DockerDesktop (originally run/initiated via WSL unbuntu 24 #sudo ./vendor/bin/sail up )

    Deployment via #npm build is fine on production.


    Scenario 1 (WSL Ubuntu): Running #npm run dev starts :5173 and is useable. Any changes in *.vue or front end need to restart #npm run dev

    Scenario 2 (Docker-View Terminal on App[laravel code]): Running #npm run dev starts :5173 and is useable. Any changes in *.vue or front end need to restart #npm run dev

    Scenario 3 (Windows CMD): running D:/xxxx/nmp run dev works as expected. Changes in the *.vue files are automatically refreshed in the browser.

    -- May be worth mentioning vue code edits are performed VScode within Windows host.

    Why is there a difference to where npm is run from if the app serves on the same port

    Possibly worth noting also that WSL and Docker terminal launch vite ~3 times slower.

    VITE v5.4.11 ready in 1355 ms

    ➜ Local: http://localhost:5173/
    ➜ Network: http://172.23.0.7:5173/
    ➜ press h + enter to show help

    LARAVEL v11.8.0 plugin v1.0.4

    Continue reading...

Compartilhe esta Página