I'm working on Symfony 3.4 and Assetic. Let's say my website is www.mycompany.com and i'm using 2 particular types of asset :
- Google web font via @Import() in my main CSS file
- Custom CSS fonts, with font files manually uploaded in in web/fonts/
When i visit my website in dev mode www.mycompany.com/app_dev.php/ :
- Google fonts are well loaded and work.
- Font awesome doesn't work (beacause app_dev.php/fonts/ is 404)
When i visit my website in prod mode www.mycompany.com/ :
- Google fonts doesn't work (@import seems not to be loaded...)
- Font awesome work (because css files are found in www.mycompany.com/fonts/)
Why this behavior ? For your information, i use Assetic this way to load myu assets :
{% stylesheets '@PimInterfaceBundle/Resources/public/css/*' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
// Same for JS
Thanks.