filenameHash

  • Type: boolean
  • Default: true
  • Version: >= 0.4.0

Whether to add a hash value to the filename after the production build.

Disable hash

By default, the filename of the output files will include a hash value:

dist/static/css/index.7879e19d.css
dist/static/js/index.18a568e5.js

You can set output.filenameHash to false to disable this behavior:

export default {
  output: {
    filenameHash: false,
  },
};

After rebuilding, the output filenames becomes:

dist/static/css/index.css
dist/static/js/index.js

Notes

  • You can use output.filename to modify the length or format of the hash. output.filename has a higher priority than output.filenameHash.
  • By default, when the target is not web, the hash will not be included in the filename of the output files, such as Node.js bundles.
  • By default, the development build filename does not include a hash.
ON THIS PAGE