Assetic files not merged into one in production

59 Views Asked by At

I'm using Assetic for managing assets in the Symfony 3.0 framework. it work fine in dev mode, each file is processed individually. But in prod mode, assets are not combined into single file.

assetic:
debug:          '%kernel.debug%'
use_controller: '%kernel.debug%'
#java: /usr/bin/java
filters:
    cssrewrite: ~
    uglifyjs2:
        bin: "%npm_bin%/uglifyjs"
        apply_to:   '\.js$'
    uglifycss:
        bin: "%npm_bin%/uglifycss"
        apply_to:   '\.css$'
    closure:
       jar: "%kernel.root_dir%/Resources/java/compiler.jar"
    yui_css:
       jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"

enter image description here

symfony/symfony: v3.0.9 
symfony/assetic-bundle: v2.8.2
1

There are 1 best solutions below

0
mahdi On

I solved this problem by changing (in web/app.php)

$kernel = new AppKernel('prod', true);

to

$kernel = new AppKernel('prod', false);