I might be misunderstanding something here so please forgive me if that is the case. I'm fairly new to webpack.
The actual files are not being saved with a version query string at the end of it when I enable versioning. So app.scss after running the build script with versioning enabled is still just app.css in the public directory. I was expecting something like app.css?3443242. The mix-manifest.json file updates correctly with the hashed version name of the file however. Is that the way it's supposed to work. I thought the file name is hashed, and the mix-manifest helps point to the right asset. Otherwise what's the point of using the mix function?
webpack.mix.js
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.version();
mix-manifest.json
{
"/js/app.js": "/js/app.js?id=0c056940c85b0701fe6e",
"/css/app.css": "/css/app.css?id=3ede8f2085da46f757cf"
}
Outputted File Names
public/js/app.js
public/css/app.css
From the change log of version 1.0.0:
File versioning has been simplified. When using mix.version(), no longer will we version the file name, itself. Instead, we'll generate an md5 of the file's contents, and apply it as a query string to the generated mix-manifest.json file. If using a service like Cloudflare, please ensure that you've enabled querystring-based cache-busting.
Related #920
Oh ok, that makes sense. Thanks.
How can we version the filename and not the hash?
Most helpful comment
From the change log of version 1.0.0:
Related #920