Skip to content

Support custom hash length for file names #6098

@shulaoda

Description

@shulaoda

When we configure the following filenames option:

{
    assetFileNames: "asset/[hash:2]/[hash:21].[ext]",
    chunkFileNames: "chunk/[hash:2]/[hash:21].js",
    entryFileNames: "entry/[hash:2]/[hash:21].js",
}

The output will be like:

dist/index.html
dist/entry/DcSeRk/DcSeRkYf9lSXpbO2Z9MlA.js
dist/asset/Cy/Cy2KvmY5OiXZpKgxC9qYG.woff2
dist/asset/NX/NXfKVKU1G6DMbanZxDC55.css
dist/chunk/iWeMGR/iWeMGRpCuefuxJj4il4pk.js
dist/entry/l_I1Zj/l_I1ZjFvwGVzBBhvABD5d.js

Should we keep the custom hash length consistent for asset, chunk, and entry filenames?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions