-
Notifications
You must be signed in to change notification settings - Fork 356
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
Browser keeps loading "old" version of js files #240
Comments
Hi @trickass, which version of the generator do you use? I have expected something like this too, but only with the current beta (where it is fixed, too). Make sure your webpack configuration does not have a key of In the current stable, watch files in the cfg directory, in the beta it is located in config/webpack. |
I've only installed the generator today via I've tried setting the |
Hi @trickass, I just tested it with a newly generated project (even uninstalling the generator and reinstalling it again) and did not have any problems. Could you give me some more information?
Also, altering the the cache key is not required (at least under osx), it does not have an impact. A valid console after a request should look like this: |
Seems fine from a setup side of things. You do not need to run anything else, just a regular npm start. I will check it, but it will take some time. Did you get any output in your command line when altering main.js? Could you please paste the output of your When the server is started and you change a file in the src directory, it should add a line like this:
|
Nothing is added there when updating, so I guess there's something going wrong on that level already... Output from
|
In this case it does not seem to be a problem with the generator, but maybe with the webpack dev server. There are some known issues from windows 8/10 users that I found here: webpack/webpack-dev-server#155. For example, if you got any special chars in your absolute path you seem to be screwed... |
I tried running it in git bash, but doesn't make a difference... I'll see if I can get some help in the webpack issue... |
Do you have any special chars in your path? If you have, try to move to project to a main folder (e.g. c:) directly and use folder naming without special chars (e.g. whitespaces, slashes...). Have a look if it works on this folder (like, move it to c:\test). Maybe this may help. |
I retried from "C:\Projects\Test", so no special chars there. What I did notice just now, when re-running the generator, is this:
Could it be that a windows alternative for this should be installed instead? |
All right! On https://webpack.github.io/docs/troubleshooting.html I found this:
I changed line 23 in cfg/base.js to (all while not in a 'special character' folder) |
Hi, I will add a cross system fix for this. Should be easy to use /on unix(likes) and \ for win. Thank you for the hint! |
No problem. Thanks for your help as well. Quick side question... I cloned the repo to see if I could fix it myself, but, where do I even find the base.js file (and other generated files)? |
When running
npm start
, a browser is launched tohttp://localhost:8000/webpack-dev-server/
(which is expected).Then, when changing anything in code, for example in the
Main.js
file, nothing happens in the browser.Worse even, when refreshing the browser window, the changes made to the source code are not reflected at all.
Is there anything else I need to do to get this working? Extra watch/build commands to run?
Thank you
The text was updated successfully, but these errors were encountered: