-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running the server does not compile files or reload page in windows. #155
Comments
The closest I can get to what I want, is to run these in separate terminals webpack --watch |
Maybe webpack-dev-server compiles your code, but did not know when to send them to the browser. Also, webpack-dev-server stores the compiled bundle in memory, thus the old copy remains in the file system. That's why your browser are always getting the old files. Webpack-dev-server reads If you access your
|
Same here, I get neither change detection or window reloading. It doesn't recompile on changes, and doesn't reload the browser. No errors. :( I can't get "webpack --watch" to do detect changes either |
@MrOrz thanks but I still have to manually refresh the page. |
@quantuminformation If you want it to live reload, you'll need to setup hot mode as instructed here: http://webpack.github.io/docs/webpack-dev-server.html#hot-mode |
same issue here, it works in osx, same config doesn't work on windows 8.1. |
I'm having the same issue. For now I'm running webpack-dev-server inside Vagrant. UPDATE: not working on Vagrant, probably because it's a shared folder :{ |
Using Webpack inside Vagrant on a non-shared folder works fine. |
@MrOrz thanks that works, however on windows chrome keeps crashing :( |
Closing anyway as the hot mode acheives what I need, however it seems like a lot of extra config to me. |
@rictorres I have the same here over Vagrant with shared folder. Have you found a way? |
if you only care about browser reload and don't need to set up hot mode than follow this workaround:
That's it. Now your browser should reload every time you modify something in your code. |
@agostlg I'm running Webpack through Gulp :) |
doesn't recompile and doesn't reload. I'm using shared folders in Vagrant |
While vbox shared folders update content they do not update the mtime of the file. If I touch the file on the guest machine it then reloads. I'm assuming inotify (or equivalent doesn't pick up these changes). More active scanning or a vbox fix seem like the only route. |
Shall I reopen this? |
Same problem here I'm using Windows 8.1 and Gulp. In Web Development Tools at Chrome in Network tab, the websocket only in pending status and return 0 bytes of size. |
I don't know, but now its working now for me at Windows 8.1... feel free to see https://github.com/alexsandro-xpt/DemoWebPackAngularGulp |
I had the same issue. The reason was that I built the output files with webpack first and than try to run the dev server. It seems that in my configuration the dev server served the files from disk no matter that in memory was something else (I could see reinvalidating bundles after changes). After removing these files from disk everything started to work again. |
I have found the solution for this on Vagrant shared folders:
Now my bundle will properly get rebuilt. |
webpack-dev-server --watch-poll works for us on win 8.1 |
I had a similar problem on Windows. Hope someone finds this helpful. |
Having the same problem due to Dropbox using |
Same problem... none of the above solutions have worked for me, and eliminating the caveats (e.g. Dropbox) has also not gotten the behavior to work as expected. |
By using --hot, you need to specify the output.publicPath in your webpack.config.js file. |
Just followed the getting started tutorial. Webpack dev server does not reload the browser after recompiling. I'm on Win 10 It seems a common pattern with any node project. Things break apart even before finishing introduction. Edit: |
Just want to say that a solution that worked for me was to use git bash for windwos. Win 7 64 Bit |
Edit: fixed it by adding windows-style path separators to devServer.contentBase property:
|
Awesome! Works fine on Windows 10. |
Indeed. Changed it to that afterwards :) made it easier for cross platform dev. |
Thanks @nathanborror for your hint about the Dropbox for Business's path convention, that solved it for me. |
A project I used has below code
It use |
webpack-dev-server --content-base ***** --inline --hot If you don't want to reload the page every time, for most platforms localhost:8080 is enough, else check in localhost:8080/webpack-dev-server/index.html |
Here is the sample working app which I have created after two days of struggle. I have used the webpack dev server API method. https://github.com/Ajaybhardwaj7/webpack-react-sample |
@quantuminformation I have successfully launched recompiled file(not manually refresh), how? seting path to dist folder and |
Moved from OS X to Windows 10 and now I've attempted most solutions in this issue to no avail.
Here's my config see |
same here, i have the exact same problem with @synthecypher |
Depending on what editor you're using, that could be causing the issue. Just found out that WebStorm was giving me this problem from Windows but not on Ubuntu (the settings must have been different on each). The setting I had to disable which made all the difference was |
I can't get it to work either, everything loads fine but upon refresh auto or even manual it does not reflect updates. My config is: https://github.com/swimlane/angular2-data-table/blob/master/webpack.config.js |
I've had the same problem with webpack 1.13.1 and webpack-dev-server 1.14.1 on Windows 10. Adding the following code to the plugins: [
new webpack.OldWatchingPlugin()
] |
This is what worked for me in windows 10: //Webpack.config.js file:
Go to cmd and type: In browser go to: http://localhost:8080/webpack-dev-server/ |
Windows 10 - IntelliJ Ultimate (aka Webstrom) this solved it for me: << Depending on what editor you're using, that could be causing the issue. Just found out that WebStorm was giving me this problem from Windows but not on Ubuntu (the settings must have been different on each). The setting I had to disable which made all the difference was use "safe write" (found in Appearance & Behaviour > System Settings), which saves changes first to a temporary file. Saving like that doesn't get picked up by webpack of course, was the cause of much frustration. >> Thanks to @lostpebble |
Closing because there are several answers to the problem. Some of these issues are also documented. If anyone still has an issue, feel free to create a new issue. |
This might be related to: #324 |
Those using |
I used Intellij 2016.2.3 on Win1 and I've also solved the problem with ctrl + s. |
Also experienced this problem with Adding relevant part of my server.js:
|
@dryoma Thank You!! I removed () from the folder name, and live reloading works :) |
@wmira Save my life |
@awesomund works for me. Vue Cli webpack, Laravel Homestead, Win10, |
Crazy this issue has been closed a year ago, tons of people on many machines still have it, and no solution by authors. On osx and have the same problem. I know one could say "it's open source you should fix it" |
There is not really a clear issue here, various people have posted their various issues here. If you still have a problem with reloading, please create a new issue and fill in all details. Locking this thread. |
From the docs it says:
It binds a small express server on localhost:8080 which serves your static assets as well as the bundle (compiled automatically). It automatically updates the browser page when a bundle is recompiled (socket.io). Open http://localhost:8080/webpack-dev-server/bundle in your browser.
However if I run it this doesn't happen: I just get the following, but when I go to the serving URL I still have my old code.
The text was updated successfully, but these errors were encountered: