jantimon / html-webpack-plugin

Simplifies creation of HTML files to serve your webpack bundles
MIT License
10.71k stars 1.31k forks source link

Bug with images using dev server #1714

Open dx1ded opened 2 years ago

dx1ded commented 2 years ago

Current behaviour 💣

Hello! I tried to use image-minimizer-webpack-plugin in dev server but there's something strange. I have generators (for .webp and .avif) and i try to require it in HTML (in my case it is .pug but never mind). When i have one require it is ok, but when i have two requires or more - the last one generates image, each previous returns default value (in my case it is .jpg).

Expected behaviour ☀️

All requires will generate expected file independently of count

Reproduction Example 👾

Environment 🖥

jantimon commented 2 years ago

Unfortunately I don't know that image minification plugin but if it doesn't work well you might open an issue for it.

Did you try to use an image minification loader instead?

dx1ded commented 2 years ago

@jantimon, no, it works greatly but when i open dev server there's some problems which i described upper. I have already opened an issue in image-minimizer-webpack-plugin repository but they told me that the problem lies in html-webpack-plugin. Speaking about another image minification loader - no, i haven't tried to use another one.

alexander-akait commented 1 year ago

@dx1ded big sorry for delay, do you still a such problem? can you provide reproducible example?