jantimon/html-webpack-plugin

Bug with images using dev server

dx1ded opened this issue · 3 comments

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 🖥

  • nodejs - v15.9.0
  • npm - v7.6.3
  • webpack - v5.65.0
  • webpack-cli - v4.9.1
  • webpack-dev-server - v4.7.0

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?

@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.

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