Laravel-mix: hmr in windows dosnt work in 0.8.9

Created on 22 Mar 2017  路  3Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 0.8.9
  • Node Version (node -v): 7.4.0
  • NPM Version (npm -v): 4.4.1
  • OS: Windows 10

Description:

npm run hot doesn't work in windows anymore. I'm opening localhost:8080/js/app.js and get the response Cannot GET /js/app.js. #78
It works in 0.8.8 but not in 0.8.8. Is the problem maybe in c3da413

Most helpful comment

I fixed it in laravel-mix 0.9.2, windows 10, follow below steps:

  1. Remove 'public' from path in webpack.mix.js. Ex: .js(['resources/assets/js/app.js'], 'public/js/app.js') to .js(['resources/assets/js/app.js'], 'js/app.js')
  1. Add below lines to webpack.mix.js:
    mix.webpackConfig({
    output: {
    publicPath: 'http://localhost:8080/'
    }
    })

I added slash to end of 'http://localhost:8080'

All 3 comments

I fixed it in laravel-mix 0.9.2, windows 10, follow below steps:

  1. Remove 'public' from path in webpack.mix.js. Ex: .js(['resources/assets/js/app.js'], 'public/js/app.js') to .js(['resources/assets/js/app.js'], 'js/app.js')
  1. Add below lines to webpack.mix.js:
    mix.webpackConfig({
    output: {
    publicPath: 'http://localhost:8080/'
    }
    })

I added slash to end of 'http://localhost:8080'

Hey thank you this works for me.

@JeffreyWay if you see this as an workaround, feel free to open the issue again :)

Removing public from webpack.mix.js fixed it for me. Thanks @vutrungduc7593!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amin101 picture amin101  路  3Comments

rlewkowicz picture rlewkowicz  路  3Comments

hasnatbabur picture hasnatbabur  路  3Comments

Cheddam picture Cheddam  路  3Comments

pixieaka picture pixieaka  路  3Comments