Va1 / browser-sync-webpack-plugin

Easily use BrowserSync in your Webpack project.
MIT License
370 stars 40 forks source link

Laravel Mix Issue #66

Closed HashandSalt closed 6 years ago

HashandSalt commented 6 years ago

Version 2 seems to break with Laravel Mix. Webpack says its building but fails to launch the browser, and browsersync. Webpack says its watching files and then almost immediately says its done and drops back to terminal prompt.

This breaks:

"devDependencies": {
    "browser-sync": "^2.23.6",
    "browser-sync-webpack-plugin": "^2.0.1",
    "cross-env": "^5.0.5",
    "laravel-mix": "^2.1.7"
  },

This works

  "devDependencies": {
    "browser-sync": "^2.23.6",
    "browser-sync-webpack-plugin": "^1.2.0",
    "cross-env": "^5.0.5",
    "laravel-mix": "^2.1.7"
  },

Any idea what the problem could be? Trouble is, Mix auto installs the most recent version of browser-sync-webpack-plugin so i'm sure I won't be the only person to run into it.

I'm using it standalone, not in a Laravel project.

alesvaupotic commented 6 years ago

I can confirm the issue. Just did a npm update today and it stopped working.

malinbranduse commented 6 years ago

@HashandSalt @alesvaupotic what versions of node are you using? I'll do some tests with laravel-mix when I get the chance

HashandSalt commented 6 years ago

Phew! glad its not just us. Running on Node 8.9.1 on a Mac (High Sierra).

alesvaupotic commented 6 years ago

Ubuntu 16.04.4 LTS

ales@r35:/var/www/$ node -v v8.10.0 ales@r35:/var/www/$ npm -v 5.7.1

Not sure about which version was last used, I just did an update as part of my weekly routine.

HashandSalt commented 6 years ago

if it helps with testing theres a simple repo over here that the issue is present in.

It's also affecting Slate, our open source framework, so hoping the issue is resolved soon.

alesvaupotic commented 6 years ago

Went back and found out the last working version for me is 2.0.1.

malinbranduse commented 6 years ago

@HashandSalt Alright, I figured node version wasn't the issue but had to check. The repo link you provided is a link to this thread, can you provide the right link? Thanks

HashandSalt commented 6 years ago

Oh whoops, sorry, ive fixed the link.

malinbranduse commented 6 years ago

@HashandSalt @alesvaupotic Guys, in the meantime you can check out this temporary fix: https://github.com/JeffreyWay/laravel-mix/issues/1538

Edit: fixed link

alesvaupotic commented 6 years ago

Thanks, my fix exactly. I hardcoded it also to 2.0.1 and it's been fine since.

malinbranduse commented 6 years ago

@HashandSalt @alesvaupotic I fixed it here https://github.com/Va1/browser-sync-webpack-plugin/pull/67 Just needs to merged.

Va1 commented 6 years ago

fix was shipped with version 2.2.2. thanks guyz

alesvaupotic commented 6 years ago

Works like a charm. Thanks!