中
我有一个被几个捆绑包使用的布局,所以我把css文件放在web/dashboard/css/中。
当我使用简单的方法:
<link rel="stylesheet" href="{{ asset('dashboard/css/bootstrap.min.css') }}" />
应用了样式,我在源代码中得到了这个HTML代码
<link rel="stylesheet" href="/boutique/web/dashboard/css/bootstrap.min.css" />
但是当我使用Assetic时
{% stylesheets 'dashboard/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
我在风格上有很多错误,我在源代码中有这段代码HTML
<link rel="stylesheet" href="/boutique/web/app_dev.php/css/ac0081b_part_1_ace-fonts_1.css" />
在modprod中,样式不起作用,我有HTML代码
<link rel="stylesheet" href="/boutique/web/css/ac0081b.css" />
正如我所说,css文件位于web/dashboard/css/
在mod prod中,样式不起作用,我有HTML代码
您确定已部署资产吗?
// install the assets calling
app/console assets:install --env=prod
// dump your assets to real files
app/console assetic:dump --env=prod
我在风格上有很多错误,我在源代码中有这段代码HTML
我认为您看到的代码就是assetic的工作方式。