Laravel-mix: mix.version not generating hashed output files.

Created on 27 Jun 2017  路  3Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 1.0.7 (npm list --depth=0)
  • Node Version (node -v): 6.11.0
  • NPM Version (npm -v): 3.10.10
  • OS: Linux Mint 18.1 64-bit

Description:

When using mix.version after upgrading to laravel-mix 1.0.x, the output chunks are not longer hashed. I thought it could have been the check I had in the mix config to check for development environment but I moved the version call outside of that and it still wouldn't hash the bundles. I had also refactored the mix config file a little, but I reverted those changes back to the exact build script I was using on the pre 1.0 versions of mix and still nothing. I have tried remove node_modules and reinstalling to no avail.

Here is a link to the project in which I am having issues:
https://github.com/brandon14/brandonclothier.me/blob/master/webpack.mix.js

Steps To Reproduce:

  1. Clone the above repository
  2. Run yarn
  3. Run npm run production
  4. Observe that the output bundles do not have hashed filenames.

Most helpful comment

Since version 1.0 mix.version() will use query string like-

app.js?id=8e5c48eadbfdd5458ec6

So you no need to worry about it. Blade mix() will take care of all.
Read more
https://github.com/JeffreyWay/laravel-mix/blob/master/docs/versioning.md

All 3 comments

Since version 1.0 mix.version() will use query string like-

app.js?id=8e5c48eadbfdd5458ec6

So you no need to worry about it. Blade mix() will take care of all.
Read more
https://github.com/JeffreyWay/laravel-mix/blob/master/docs/versioning.md

Yes, the query string is added in the manifest file and is job longer appended to the file. Like @ankurk91 said, if you're using laravel, it's taken care of for you.

@devcircus @ankurk91 thanks! I guess I should have read the new docs. I was expecting to see a hash in the filename.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdebacker picture sdebacker  路  3Comments

Bomavi picture Bomavi  路  3Comments

wendt88 picture wendt88  路  3Comments

stefensuhat picture stefensuhat  路  3Comments

kpilard picture kpilard  路  3Comments