Laravel mix minify but copy un-minified version HI,
What I am trying to achieve is minifying a js file and copy the result to the public directory
I tried
mix.minify('resources/assets/js/dropzone.js').copy('resources/assets/js/dropzone.min.js', 'public/js/dropzone.min.js');
or simply
mix.copy('resources/assets/js/dropzone.js', 'public/js/dropzone.min.js');
But I end up with a dropzone.min.js file that is not minified. For the record, I run npm run prod and I have a minified version in the resource directory but it is not moved to public dir.
What am I missing here?
npm : 6.5.0
laravel-mix: 4.0.13
mix.js('resources/js/app.js', 'public/js')
The default already copies the file into the public folder as app.js.
So makes sense then:
mix.js('resources/assets/js/dropzone.js', 'public/js')
would create a dropzone.js file in public for you. Rest is really irrelevant if you minify on deploy anyways.
You can keep adding files as needed:
mix.js('resources/assets/js/dropzone.js', 'public/js')->js('resources/assets/js/app.js', 'public/js')
Thanks, @jekinney , it solved my problem for js.
I have figured out the problem I have for the dropzone.css as well.
:)
Please sign in or create an account to participate in this conversation.