2👍
Mix already uses babel compilation with .js, so you should remove the separate .babel call:
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.tailwind('./tailwind.config.js')
.version();
And then in your view:
<script src="{{ mix('/js/app.js') }}"></script>
To configure the browsers, use browserlist (https://www.npmjs.com/package/browserslist). I think it’s already working out of the box with laravel mix.
Example of .browserslistrc File:
# Browsers that we support
last 1 version
> 1%
IE 11
maintained node versions
not dead
And here is a good link for browserlist and browser-usage: https://browserl.ist
Source:stackexchange.com