Error when mix JS files in production
See original GitHub issue- Laravel Mix Version: 0.12.0
- Node Version: 7.10.0
- NPM Version: 4.2.0
- OS: Windows 10
Description:
I use Laravel Mix to mix CSS et JS files.
I use the command: npm run production
I have undefined in combined.js file.
But, the command npm run dev works.
I have this to mix:
mix.scripts([
'public/backend/assets/js/jquery.min.js',
'public/backend/assets/js/bootstrap.min.js',
'public/backend/assets/js/detect.js',
'public/backend/assets/js/fastclick.js',
'public/backend/assets/js/jquery.slimscroll.js',
'public/backend/assets/js/jquery.blockUI.js',
'public/backend/assets/js/waves.js',
'public/backend/assets/js/wow.min.js',
'public/backend/assets/js/jquery.nicescroll.js',
'public/backend/assets/js/jquery.scrollTo.min.js',
'public/backend/plugins/switchery/switchery.min.js',
'public/backend/plugins/bootstrap-sweetalert/sweet-alert.min.js',
'public/backend/plugins/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js',
'public/backend/plugins/waypoints/lib/jquery.waypoints.js',
'public/backend/plugins/counterup/jquery.counterup.min.js',
'public/backend/plugins/jquery-circliful/js/jquery.circliful.min.js',
'public/backend/plugins/jquery-sparkline/jquery.sparkline.min.js',
'public/backend/plugins/skyicons/skycons.min.js',
'public/backend/assets/pages/jquery.dashboard.js',
'public/backend/plugins/morris/morris.min.js',
'public/backend/plugins/raphael/raphael-min.js',
'public/backend/plugins/summernote/dist/summernote.min.js',
'public/backend/assets/js/jquery.core.js',
'public/backend/assets/js/jquery.app.js',
], 'public/backend/javascripts/combined.js');
Steps To Reproduce:
To reproduce error, you must type this command: npm run production
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error when mix JS files in production · Issue #832 - GitHub
I use Laravel Mix to mix CSS et JS files. I use the command: npm run production. I have undefined in combined.js file....
Read more >error with mix.js in production mode - Laracasts
Ok. I found a solution. I use platform cartalyst, which compiles the files again and minify it. I load the app.js the normal...
Read more >Error trying to compile newest Laravel Mix 6 app.js
I have been using Laravel Mix to bundle my CSS and JS files, ... When I run npx mix --production, the resulting app.js...
Read more >Frequently Asked Questions | Laravel Mix Documentation
If you're running npx mix through a VM, you may find that file changes are not picked up by webpack. If that's the...
Read more >Compiling Assets (Mix) - The PHP Framework For Web Artisans
The webpack.mix.js file is your entry point for all asset compilation. ... To avoid JavaScript errors, be sure to load these files in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in v0.12.1.
This is related to https://github.com/JeffreyWay/laravel-mix/issues/828 . Note that specifying mix version 0.11.4 in your package.json resolves it until a fix is committed.