Laravel-mix: Hot reload not working, How to display localhost:8080 with homestead

Created on 30 Aug 2017  路  4Comments  路  Source: JeffreyWay/laravel-mix

  • laravel Version: 5.5
  • Laravel Mix Version: "^1.0",
  • Node Version: 6.11.2
  • NPM Version: 3.10.10
  • Windows : 8 - 64 bit
  • Laravel Homestead
  • Hello i installed fresh laravel project version (5.5), i run npm install... everyting work fine, the only thing is when i run (npm run hot) in vm environment, no error shows but (Hot module replacement) is not working, when i typed _localhost:8080_ it also did not work .
    i follow the instructions in this line for @JeffreyWay.
    i added the line in the blade page it gave me this error.
    capture-d ecran-2017-08-30-18 00

    please can someone help me ...

    stale

    Most helpful comment

    This is not working anymore. Can someone provide a real solution for hot-reload using windows/homestead ?

    All 4 comments

    This was something kinda hard for me to grasp as well.

    The key to making hot reloading work within a Laravel application is ensuring that all script sources reference the Node server URL that we just booted up. This will be http://localhost:8080. Now you could of course manually update your HTML/Blade files, like so:

    <body>
        <div id="app">...</div>
        <script src="http://localhost:8080/js/bundle.js"></script>
    </body>
    

    https://github.com/JeffreyWay/laravel-mix/blob/master/docs/hot-module-replacement.md

    In essence, go to your normal http://yoursite.dev or http://localhost:9090 and ensure that the script

    <script src="/js/bundle.js"></script>
    

    is changed to

    <script src="{{ mix('js/bundle.js') }}"></script>
    

    Thanks @sifex! That worked for me.

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

    This is not working anymore. Can someone provide a real solution for hot-reload using windows/homestead ?

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    hasnatbabur picture hasnatbabur  路  3Comments

    rderimay picture rderimay  路  3Comments

    kpilard picture kpilard  路  3Comments

    rlewkowicz picture rlewkowicz  路  3Comments

    stefensuhat picture stefensuhat  路  3Comments