-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
dev-server serving old files #397
Comments
Nevermind, as usual, it was me being a f***ing moron |
Could you share your solution for other f***ing morons around the internet, like me? |
Lmao. You've got to put new webpack.DefinePlugin({
'process.env.NODE_ENV': '"development"' Otherwise, the define plugin just literally puts |
Ok not what I was expecting but thanks. My solutions for other googlers: Why is webpack-dev-server serving old files? webpack-dev-server has no persistent cache. If you restarted it and it continue serving old files, it means that those files actually exist somewhere in your directory structure and are picked. Did you duplicate your project and are still pointing to the old one, for ex. through "publicPath" or "contentBase"? (= my problem) Why is react complaining about Yes, the incorrect line |
👆🏽This... ...made me look for stupid, obvious stuff and found an accidentally duplicated folder that was confusing things. 🙈 Thank you, @Offirmo! |
For me, this was the |
So, I created my webpack config:
Only, as you may have noticed, I didn't put quotes inside the quotes for the development environment. So, I get an error,
development is undefined
. No matter. I'll just add the quotes, right?Wrong.
development is undefined
. Ok, I must have done something wrong. A little more debugging, and ...development is undefined
.Ok, wtf. All right fine, I'll try
'process.env.NODE_ENV': "'dog'"
. Just as a sanity check.development is undefined
Ok, this is really weird. I delete the plugin entirely.
development is undefined
. I remove all the code from my entry file:development is undefined
.Ok, so finally, I figured out, webpack for whatever reason has just decided to continue serving a file from 8 builds ago and hasn't bothered to tell me. Ok, great.
So now what? All right, I'll try --no-cache on the dev server. Maybe it's just a "helpful" feature of webpack.
development is undefined
.So, anyway, kind of at the end of my rope here. Does anyone have any suggestions for how I might fix this?
The text was updated successfully, but these errors were encountered: