jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

Feature template cache #422

Closed nueko closed 7 years ago

nueko commented 7 years ago

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here) currently it loads static partial templates

What is the new behavior? it uses gulp-template-cache so the views not need to copy, also it faster as it is combined

Does this PR introduce a breaking change?

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

nueko commented 7 years ago

i think it should be applied on production only.

jadjoubran commented 7 years ago

Hi @nueko Thanks a lot for your time We've used to have this feature before but then it was removed because template caching will create bigger and bigger javascript bundles, which makes the app slower to load, especially on slower connection The move is inline with the recommendations on Google Web Fundamentals regarding delaying the execution of Javascript when possible rather than executing huge bundles

If this is an issue for your app, you can easily cache those templates after the first visit using the sw-toolbox in the Service Worker config file

Cheers!