我没有得到它 - 我已经设置了一些symfony项目,但现在我完全迷失了错误信息:
contains an error: There is no "cssrewrite" filter.
作曲家:
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.1.*",
"symfony/monolog-bundle": "^2.8",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"ircmaxell/password-compat": "^1.0",
"nelsonkopliku/twig-exception": "0.*",
"predis/predis": "^1.1",
"symfony/assetic-bundle": "2.8"
},
应用程序/配置/ config.yml
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ 'oneBundle', 'anotherBundle' ]
#java: /usr/bin/java
filters:
uglifyjs:
bin: /usr/local/bin/uglifyjs
uglifycss:
bin: /usr/local/bin/uglifycss
less:
node: "/usr/local/bin/node"
node_paths: [/usr/local/lib/node_modules/]
cssrewrite: ~
在模板中:
{% stylesheets
'assets/vendor/bootstrap/dist/css/bootstrap.css'
'assets/vendor/font-awesome/css/font-awesome.css'
filter="cssrewrite,?uglifycss" %}
<link href="{{ asset_url }}" rel="stylesheet" />
{% endstylesheets %}
如果删除cssrewrite,uglifycss
过滤器可以正常工作。
也作为交叉检查 - 我从配置中删除了uglifycss,然后它抱怨丢失的过滤器。
关于我如何解决这个问题的任何想法?