No it is correct, I can confirm as I use .version() and it does indeed hash my .js/css files. What does your Laravel Mix webpack file look like, can you post it? also what version of Laravel Mix do you have in your package.json/package-lock.json?
Mix documentation wrong/outdated ?
The docs say "The version method will automatically append a unique hash to the filenames" and that I should use the mix helper to detect file names () but that not seem to be the case. My javascript is NOT hashed after adding .version , it's still under public\js\app.js and layout.app is loading it just fine with asset('js/app.js') , no mix helper needed ...
I think the docs are wrong in that it says;
After generating the versioned file, you won't know the exact file name. So, you should use Laravel's global mix function within your views to load the appropriately hashed asset. The mix function will automatically determine the current name of the hashed file:
but that is not how it works these days. Your app.css and app.js have an ?id= appended which corresponds with the latest build.
since mix() is only responsible for appending the current id, then the files still work as app.css and app.js without the addition of the id, but of course with no cache busting
Please or to participate in this conversation.