Laravel-mix: npm run hot doesn't work with mix.version()

Created on 22 Feb 2019  路  6Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 4.0.14
  • Node Version : v10.15.0
  • NPM Version (npm -v): 6.4.1
  • OS: Windows 10

when i run
npm run hot
all working well before first changes in css or js files.
in console
[HMR] Waiting for update signal from WDS...
[WDS] Hot Module Replacement enabled.
After changes.
[WDS] App updated. Recompiling...

but if i disable mix.version() all working

stale

All 6 comments

Search before reporting, it has been reported tons of times

I worked around it by wrapping the mix.version call in an if statement:

if (!process.argv.includes('--hot')) {
    mix.version()
}

I worked around it by wrapping the mix.version call in an if statement:

if (!process.argv.includes('--hot')) {
    mix.version()
}

Thanks. but css still does not update

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.

@ankurk91 while that might be true, this is the only thread I found and even that took me a while. So I am glad it was raised ... again!? Is there a fix planned to make them both work together? Is there an open ticket for it? Or can you link some old closed once for reference? Thanks!

@Lunatig FYI, the above fix works for me for scss in .scss and .vue files. Hope it works for you by now.

Update: sry, doesn't work with .scss files :/
Update 2: @Lunatig this made it work for me now: https://serversideup.net/using-sass-vue-components-laravel-mix/
_(sorry everyone for the ticket spam)_

Agree, this should have been fixed within source code but no one cares.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dtheb picture dtheb  路  3Comments

nezaboravi picture nezaboravi  路  3Comments

wendt88 picture wendt88  路  3Comments

jpriceonline picture jpriceonline  路  3Comments

sdebacker picture sdebacker  路  3Comments