-
-
Notifications
You must be signed in to change notification settings - Fork 15
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 in image-minimizer-webpack-plugin] Error after second build if cache is filesystem
#130
Comments
I think this is a BUG in let result = {
data: options.input,
filename: options.filename,
warnings: [],
errors: [],
info: {
sourceFilename: options.info && typeof options.info === "object" && typeof options.info.sourceFilename === "string" ? options.info.sourceFilename : typeof options.filename === "string" ? options.filename : undefined
}
}; Note Try to disable the There will be defined the See in getSourceFileName(module, runtimeTemplate) {
return makePathsRelative( // <== Return always relative path
runtimeTemplate.compilation.compiler.context,
module.matchResource || module.resource,
runtimeTemplate.compilation.compiler.root
).replace(/^\.\//, "");
} Intern webpack uses the Where occurs the errorSee in newAssetInfo = mergeAssetInfo(data.get("assetInfo"), newAssetInfo); // <= here occurs error When in both objects Bugfix in
|
There is the minimal test to reproduce the issue cache-filesystem-rebuild-image-minimizer.
|
@vralle |
I updated Build log:
At the end:
|
hm, in my very simple example (cache-filesystem-rebuild-image-minimizer) I can reproduce the issue with Possible, you have more complex use case. I will create then next minimal example to reproduce the issue. |
You can deploy webpack-html-bundler-starting-template in Codespaces (top right corner -> "Code" button -> Codespaces) and play with code there. |
Offtopic: try new |
using edge config, it's really much faster: 1.6 sec vs 4 sec :-) |
@vralle The fix #460 doesn't fix the issue. |
filesystem
filesystem
I have just tried to set cache to
filesystem
and had got similar errors.I turned logging on in webpack.config
The first build has some information about caching, but succeeds:
Second build without any changes fails with errors:
I use
image-minimizer-webpack-plugin
withminimizer
andgenerator
setup and all of endpoint images have getting the same error.I haven't found any clear instructions on caching for plugins. I guess it's not an easy task with the current Webpack architecture.
There is the repository.
Originally posted by @vralle in #109 (comment)
The text was updated successfully, but these errors were encountered: