templates - How to include CSS and JS once in Laravel 5 -
i building large laravel 5.2 application. using number of 3rd party libraries (such jquery, d3, , others).
i combine libraries single file (with elixir), since of pages won't need full set, keep them separate. templates complex, , want easy way make sure css/js file included, once.
currently, in our master template, have stacks css , js, , push onto stack, example:
@push( asset('path.js') )
but, doesn't give way ensure file included once, like
@pushonce( asset('path.js') )
i couldn't find extensions provide this. there extensions provide this? need implement myself? or taking wrong approach (this can't unique problem).
one thing makes app special users might in slow connections (2g) , have cross china firewall, i'm hesitant concatenate single file (file size makes huge difference).
Comments
Post a Comment