laravel app.js very large file size

前端 未结 1 1740
梦如初夏
梦如初夏 2021-02-15 01:57

I have deployed a Laravel 5.3 application to Heroku. However, when loading /login, I noticed a very slow page load time. The problem seems to be a very large app.js

1条回答
  •  梦毁少年i
    2021-02-15 02:35

    From the looks of your link you've not created a production version of your assets, and currently all the source maps are in your app.js file, which will be adding a lot of the file size, the css and js output are also not compress/minified either.

    Assuming you're using laravel elixir, you just need to run gulp --production and this will remove the source maps, compress the js and css outputs, etc.

    0 讨论(0)
提交回复
热议问题