Aronaman
1 month ago
269
5
Mix

compile css and js

Posted 1 month ago by Aronaman

hey everybody, for my front end I download template adds I copy CSS and js code to my public folder. then I access it as {{asset()}}.

my question is what is the best way to better performance (page-load). and how to use can for my template css and js.

//instead of just copy my CSS and js and compressed, I prefer using laravel mix like this

mix.js('resources/js/app.js', 'public/js')
	js('resources/js/jquery-3.3.1.min.js', 'public/js')
	js('resources/js/jquery-ui.js')
	js('resources/js/popper.min.js', 'public/js')
	js('resources/js/aos.js', 'public/js')

 .sass('resources/sass/app.scss', 'public/css')
   .sass('resources/sass/bootstrap.min.css', 'public/css')
   .sass('resources/sass/magnific-popup.css', 'public/css')

most of css and js code are static, so how can I use cdn for template driven css and js.

thanks in advance

Please sign in or create an account to participate in this conversation.