-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
module.rule.generator.emit = false
results in different emitted filenames
#217
Comments
Please do not duplicate issues |
Please add configuration for https://github.com/billyjanitsch/webpack-bug-emit-hash |
The configuration is here. |
We prepare big refactor of the plugin and loader in near future, and will solve this problem, right now please disable |
Thank you for the fast reply. Disabling |
I will look at this deeply in near future |
Fixed, sorry for big delay, we rewrite plugin from scratch and now have better support asset modules, here example to generate webp and oprimize images, please try https://github.com/webpack-contrib/image-minimizer-webpack-plugin#optimize-and-generate-webp-images |
Expected Behavior
When
module.rule.generator.emit
is set tofalse
for asset resources, webpack is supposed to emit the same filename as when it's set totrue
.Actual Behavior
This doesn't work correctly if there's an image minimizer in the chain, presumably because the minifier is only running when
{emit: true}
and ends up influencing the asset hash.Note that this reproduces regardless of the asset filename, e.g., setting it to something like
[contenthash][ext]
does not fix the issue.Not sure if this bug is specific to
image-minimizer-webpack-plugin
or generally an issue with webpack, so I'm reporting it in both places. (See webpack/webpack#13628.)Code
Here is a minimal reproduction repo.
How Do We Reproduce?
See the readme and test file in the repo for details.
The text was updated successfully, but these errors were encountered: