Symfony 2 - Working with assets

前端 未结 3 1026
广开言路
广开言路 2020-12-07 18:01

I need some tips on how to work with assets in Symfony 2. For example, do we have to always perform the assets:update every time an image is added ? I know Assetic take care

3条回答
  •  死守一世寂寞
    2020-12-07 18:27

    As of Symfony 2.7 this will generate relative symlinks in web directory:

    php app/console assets:install web --symlink --relative
    

    In composer.json add:

    "extra": {
        "symfony-assets-install": "relative"
    }
    

    This will also generate relative symlinks on composer update.

提交回复
热议问题