MB's avatar
Level 2

mix.version() does not make the files

Hi,

I have this code in webpack.mix.js

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .version();

mix.styles([
    'node_modules/mdbootstrap/css/mdb.min.css',
    'resources/css/mdbootstrap.css'
], 'public/css/all.css').version();

I then run "npm run dev"

This should make versioning files, but it does not. Nothing in the pubic folder. Why is that?

0 likes
4 replies
MB's avatar
Level 2

Anyone? Still haven't found a solution for this :(

cajogos's avatar
cajogos
Best Answer
Level 8

Hey @mb have you checked your mix-manifest.json file? That should tell you the version numbers. Also, according to this https://laravel-mix.com/docs/5.0/versioning#laravel-users you need to use mix() function in your Laravel Blade files.

The files get appended with a hash at the end, so it doesn't create new files for you it just adds the hash for cache busting.

1 like
MB's avatar
Level 2

I feel so stupid. I thought new files was created. Thanks for the help - all working. Just needed to add {{ mix() to my templates }} :)

1 like
cajogos's avatar

No worries! I am glad I was able to help :)

Please or to participate in this conversation.