-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
index.html disappear with watch mode (HtmlWebpackPlugin) #1476
Comments
This is another issue with the @jantimon In the past, I described a solution, here alternative example of caching child compilations https://github.com/webpack-contrib/worker-loader/blob/master/src/supportWebpack4.js#L3, please fix it |
This issue happens to me sometimes and requires me to run |
I'm having this issue as well - here is my webpack.config.js: https://github.com/josephspurrier/goreactapp/blob/master/src/app/ui/webpack.config.js Here is the NPM command I run to start the watching of webpack: https://github.com/josephspurrier/goreactapp/blob/master/src/app/ui/package.json#L7 I will make changes to the javascript files and the reloading will work for 5-10 minutes, and then I will receive a 404 on my web server because the index.html file is missing. Here is with the index.html file missing after a few changes: |
fixed in html-webpack-plugin@5.0.0-alpha.10 |
fixed in html-webpack-plugin 5.0.0 |
Bug report
What is the current behavior?
Hi, I'm brand new to webpack, just wanted to say that I observed what I believe is a bug.
Following the guides in order (getting started, asset management, output management, and now development).
In the development guide, we install the watch (npm) script.
I noticed that when I run
npm run watch
, the ./dist/index.html file disappear.I suppose this is not the normal behaviour of the HtmlWebpackPlugin plugin, because if I now run
npm run build
(which calls the webpack binary without the watch option), then the ./dist/index.html is re-created again.So to sum up, I would think that there is a problem with the HtmlWebpackPlugin in watch mode, it doesn't recreate the index.html file in the dist directory.
Here is my webpack and npm configurations:
webpack
npm
If the current behavior is a bug, please provide the steps to reproduce.
follow the guides in order
What is the expected behavior?
npm run build
andnpm run watch
should behave the same no matter what the plugins are.Other relevant information:
webpack version: 4.43.0
Node.js version: v12.16.1
Operating System: mac osX 10.14.6
Additional tools:
This issue was moved from webpack/webpack#10761 by @evilebottnawi. Original issue was by @lingtalfi.
The text was updated successfully, but these errors were encountered: