Skip to content
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

Bug with images using dev server #1714

Open
dx1ded opened this issue Dec 27, 2021 · 3 comments · May be fixed by webpack/webpack#15459 or webpack/webpack#18714
Open

Bug with images using dev server #1714

dx1ded opened this issue Dec 27, 2021 · 3 comments · May be fixed by webpack/webpack#15459 or webpack/webpack#18714

Comments

@dx1ded
Copy link

dx1ded commented Dec 27, 2021

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
@jantimon
Copy link
Owner

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
Copy link
Author

dx1ded commented Dec 28, 2021

@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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants