Symfony2资产工具中资产的路径
我在引用目录中的css文件时遇到问题Symfony2资产工具中资产的路径,symfony,twig,assetic,Symfony,Twig,Assetic,我在引用目录中的css文件时遇到问题 src\FirstLast\Bundle\AppBundle\Resources\public\css 使用assetic命令? 我应该使用类似于: {% stylesheets 'bundles/firstlastapp/css/*' filter="cssrewrite" %} <link href="{{ asset_url }}" rel="stylesheet" type="text/css" /> {% endstylesh
src\FirstLast\Bundle\AppBundle\Resources\public\css
使用assetic命令?
我应该使用类似于:
{% stylesheets 'bundles/firstlastapp/css/*' filter="cssrewrite" %}
<link href="{{ asset_url }}" rel="stylesheet" type="text/css" />
{% endstylesheets %}
有什么线索吗
愿景给出的解决方案:
php app/console assets:install web --symlink should do the job.
但这不起作用
到底发生了什么
假设您处于prod模式,您应该启动命令php-app/console-assetic:dump-env=prod。它将一次性导出您的不同文件,而不是每次呈现页面时都像在dev模式下一样。php-app/console-assets:install-web-symlink应该可以完成这项工作。这真是太好了。我很困惑@Acme。。。有效,而bunble/acme。。。不。
php app/console assets:install web --symlink should do the job.