Feature: add compiler output options support for hash
Hi!
It will be cool if loader will support output options of webpack, especially options for hash like as hashDigestLength. It is very useful if I should have the same length for all files after compilation. But now, I should set the same setting for all loaders that using loader-utils for processing files in core.
According to my opinion I should stay here proof based on webpack documentation (https://webpack.js.org/configuration/output/#output-filename):
The lengths of [hash] and [chunkhash] can be specified using [hash:16] (defaults to 20). Alternatively, specify output.hashDigestLength to configure the length globally.
The main word is globally, I expect that global scope is including loaders too.
Has there been any progress on this? Anything needed? It would be nice to support hashDigestLength for consistency when using loaders like file-loader. I noticed the PR (#120) has been left open.
Should be solved on webpack side
No, it is won't fix, we can't calculate hash of build on loader side
@rightaway it is won't fix, no need issues, you can use output: 'dist/[hash]' if you need unique directory on build
@evilebottnawi I'm using [contenthash] for my project outputs so it would be nice if loader-utils supported output.hashDigestLength for that like Webpack's outputs do.