boolean | stringtrueConfigure whether to add a hash value to the filename after the production build.
By default, output file names include a hash value:
You can set output.filenameHash to false to disable this behavior:
After rebuilding, the output filenames become:
The default hash format is contenthash:8, which generates an 8-bit hash based on the content of the file.
You can set output.filenameHash to other formats supported by Rspack and customize the length.
The optional hash formats are:
fullhash: The hash value of the entire compilation. If any file changes, the hash values of all output files in the entire project will change.chunkhash: The hash value of the chunk. The hash value will only change when the content of the chunk (and its included modules) changes.contenthash: The hash value of the file content. The hash value will only change when the content of the file itself changes.output.filenameHash.web, the hash will not be included in the filename of the output files, such as Node.js bundles.