html-webpack-plugin icon indicating copy to clipboard operation
html-webpack-plugin copied to clipboard

Bug with images using dev server

Open vovados1 opened this issue 4 years ago • 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

vovados1 avatar Dec 27 '21 12:12 vovados1

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 avatar Dec 28 '21 15:12 jantimon

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

vovados1 avatar Dec 28 '21 21:12 vovados1

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

alexander-akait avatar Jun 10 '23 16:06 alexander-akait