Seeking advice on the best way to include JavaScript files in a Laravel and VueJS project. I've tried one method from a YouTube video, but it's not always reliable and might not be the best practice. Any alternative suggestions?
var src = [
import.meta.env.VITE_APP_URL +'/assets/frontend/vendor/jquery/jquery-3.2.1.min.js',
import.meta.env.VITE_APP_URL + '/assets/frontend/vendor/animsition/js/animsition.min.js',
import.meta.env.VITE_APP_URL + '/assets/frontend/vendor/bootstrap/js/popper.js',
// more script URLs...
];
for (var i = 0; i < src.length; i++) {
const script = document.createElement('script')
script.src = src[i];
script.async = false;
document.getElementById('scripts').appendChild(script);
}