Friday, March 31, 2017

Laravel 5.4 Webpack Uglify: Output exceeds 32000 characters

I have upgraded from laravel 5.3 to 5.4 and switched over to using webpack instead of gulp. Everything works fine when running

npm run dev

But as soon as I run it for production

npm rum production

I get the following warnings.

 95% emitting

 DONE  Compiled successfully in 25146ms

 WARN: Output exceeds 32000 characters
 WARN: Output exceeds 32000 characters
 WARN: Output exceeds 32000 characters
 WARN: Output exceeds 32000 characters
 WARN: Output exceeds 32000 characters

I have added this piece of code, (not even sure if this is valid) im not getting any errors on build though to my webpack.mix.js file.

mix.options({
    uglify: {
        output: 50000
    }
});

These warning i get on my local homestead dev environment and on the production server.

Just the normal laravel dependancies (jquery, bootstrap) gets built to app.js

All my 3rd party vendor script n build to vendors.js

All my custom code I build to custom.js

Just to see if this solves the issue but it does not.



via Louwki

Advertisement