By using Laravel, impossible to compile a list of JS that are already minified, it's like Webpack ignores it :
.js(
[
'resources/assets/theme/js/bootstrap.min.js',
'resources/assets/theme/js/canvasjs.min.js',
'resources/assets/theme/js/contact.js',
'resources/assets/theme/js/countdown.js',
'resources/assets/theme/js/counterup.min.js',
'resources/assets/theme/js/jquery-3.3.1.min.js',
'resources/assets/theme/js/jquery-ui.min.js',
'resources/assets/theme/js/magnific-popup.min.js',
'resources/assets/theme/js/main.js',
'resources/assets/theme/js/map.js',
'resources/assets/theme/js/modernizr-3.6.0.min.js',
'resources/assets/theme/js/nice-select.js',
'resources/assets/theme/js/owl.min.js',
'resources/assets/theme/js/paroller.js',
'resources/assets/theme/js/plugins.js',
'resources/assets/theme/js/waypoints.js',
'resources/assets/theme/js/wow.min.js'
]
, 'public/theme/js/min.js')
Any ideas ?
Thanks for your help
What you're using is Laravel Mix. The .js files are not ignored even if it's minified. What's actually happening is you included a 'bootstrap.min.js' but that library requires jQuery as well. Try adding jQuery like so:
.js(
[
'resources/assets/theme/js/jquery.min.js', // this one
'resources/assets/theme/js/bootstrap.min.js',
'resources/assets/theme/js/canvasjs.min.js',
'resources/assets/theme/js/contact.js',
'resources/assets/theme/js/countdown.js',
'resources/assets/theme/js/counterup.min.js',
'resources/assets/theme/js/jquery-3.3.1.min.js',
'resources/assets/theme/js/jquery-ui.min.js',
'resources/assets/theme/js/magnific-popup.min.js',
'resources/assets/theme/js/main.js',
'resources/assets/theme/js/map.js',
'resources/assets/theme/js/modernizr-3.6.0.min.js',
'resources/assets/theme/js/nice-select.js',
'resources/assets/theme/js/owl.min.js',
'resources/assets/theme/js/paroller.js',
'resources/assets/theme/js/plugins.js',
'resources/assets/theme/js/waypoints.js',
'resources/assets/theme/js/wow.min.js'
]
, 'public/theme/js/min.js')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.