Experimenting with Vue.js the first thing I noticed is how every instance of a component that I define as single file component and include as custom element gets a random hash attribute like data-v-58fd7087="".
Specifically:
- Every DOM element of every instance of a given component gets the same hash
- The hash is generated independently of the router
- The hash is stable between calls
- The hash is stable between name changes of the component
- The hash is not stored / generated on the disk
- Thus the hash is generated dynamically
Could it be generated by Karma or Webpack that are part of my Vue setup? If not, these are some surprising observations to me. It leads to two questions:
- When and how is this hash (attribute) generated?
- Why is the hash (attribute) generated?