ThePenguin's avatar

Laravel 5.4 Mix doesn't version files that have been copied.

If I include the following line in my webpack.mix.js:

mix.copy("resources/assets/css/vendor.css", "public/css").version();

The file is correctly copied over, but it is not versioned. Any idea how to fix this?

Thanks!

0 likes
7 replies
bashy's avatar

Can you version a copied file?

ThePenguin's avatar

I tried this too:

mix.copy("resources/assets/css/vendor.css", "public/css"); mix.version("public/css/vendor.css");

Made no difference :(

ejdelmonico's avatar

Did you read the version code? It will answer your question.

ThePenguin's avatar

It works outside of webpack and is unsupported on copy and combine.

gfabrizi's avatar

...but... why???? I'm working with plain old javascript libraries and with a mix of plain css and sass for the stylesheet. With the old gulp system i can combine the js files like i want, minify and version them. Same for the css. I'm still using gulp/elixir on L5.4, it's a great workflow and it works!

1 like
geodeveloper's avatar

You can do this:

mix.copy('resources/assets/css/vendor.css', 'public/css')
mix.styles('public/css/vendor.css', 'public/assets/css/vendor.css').version();

I hope it helps :).

1 like

Please or to participate in this conversation.