Closed aarefiev closed 5 years ago
@aarefiev please use issue template in future, issues without template was closed and ignored
Yep, it is make sense, we need fix it on loader-utils
for better future integration, so it is not related to file-loader
, because other loaders also use this library for hashes and have same problem. Please create issue in loader-utils
and attach link to the PR. Thanks!
Hi!.
Thanks for great loader. It's really save my time :).
Some days ago I worked on configuring webpack for my own project and I found that I can't use the same output filename settings for all loaders. Especially, for file-loader.
Here is the part of webpack.config.js:
After compilation I found that the hash part of name of extracted css and bundled files are truncated, but all other assets that I uploaded as is with file-loader are not. As solution, I should pass maxLength to options.name (in format [name].[hash:8].[ext]) and it will work as I expected.
I think it is not good because I should pass the same settings for each loader. Maybe is better to support compiler settings? I know that you using loader-utils for process files, that's why I submitted my request there (https://github.com/webpack/loader-utils/pull/120).
I will be glad to hear what you think about it. Thanks :')