Skip to content

Latest commit

 

History

History
52 lines (45 loc) · 735 Bytes

customPathLabels.md

File metadata and controls

52 lines (45 loc) · 735 Bytes

Custom Path Labels

By default path labels replace only <hash>, but you can customize it and add more labels by defining pathLabels in your config.

Default labels:

{
  "pathLabels": {
    "hash": "[a-zA-Z0-9]+"
  }
}

Adding more labels:

{
  "baseDir": "./build",
  "pathLabels": {
    "chunkId": "[\\w-]+"
  },
  "files": [
    {
      "path": "*.<hash>.chunk.<chunkId>.js"
    },
    {
      "path": "*.<hash>.js"
    }
  ]
}

Customizing and adding more labels:

{
  "baseDir": "./build",
  "pathLabels": {
    "hash": "[a-z]+",
    "chunkId": "[\\w-]+"
  },
  "files": [
    {
      "path": "*.<hash>.chunk.<chunkId>.js"
    },
    {
      "path": "*.<hash>.js"
    }
  ]
}