ctf0 / laravel-mix-versionhash

Auto append hash to file instead of using virtual one
MIT License
61 stars 18 forks source link

Option for delimiter #4

Closed olssonm closed 6 years ago

olssonm commented 6 years ago

Great plugin! Much better than the query-based default.

I however prefer to use - as a delimiter (i.e. app-652f21.js) instead of the fixed ..

I've added the option to set your own delimiter:

mix.versionHash({
  length: 6,
  delimiter: '-'
});

The regex in play should be fully escaped to use any possible delimiter. Will also be backwards-compatible.

Hope this get merged. Thanks again!