Auto append hash to file instead of using virtual one Read More
Installation
npm install laravel-mix-versionhash --save
Usage
require('laravel-mix-versionhash')
mix.versionHash();
- for removing old files use Clean for WebPack
Options
option | type | default | description |
---|---|---|---|
length | int | 6 |
the hash string length |
delimiter | string | '.' |
the delimiter for filename and hash, note that anything other than . - _ will be removed |
Known Issues
Bug when combined with BrowserSync
Currently v1.1.1, there's a bug which causes BrowserSync to not start
after compiling the code. to get around that you can use mix.versionHash()
like so
// …
if (mix.inProduction()) {
require('laravel-mix-versionhash')
mix.versionHash()
}