Allow remote asset URLs & empty favicon fix #183
Merged
+31
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two parts to this PR :
LaRecipe::script()
orLaRecipe::style()
larecipe.ui.fav
is empty (default value)Part 1 - Remote Asset URLs
Our product uploads all of our built assets to a CDN on deployment. We add assets to LaRecipe through a service provider like so:
There is a massive performance improvement if LaRecipe can simply add the remote URL as the src of the scripts/styles instead of routing through the ScriptController/StyleController endpoints.
I wasn't sure if this feature should be switched on/off through a config option. Let me know if you think I should add that.
Part 2 - Favicon Fix
I noticed that with the default value of
''
for thelarecipe.ui.fav
config option, the template still added the<link rel="apple-touch-icon" />
and<link rel="shortcut icon" />
tags, which caused the browser to make requests to the root URL of our application. The fix makes these conditional based on the config value not being falsey.