Symfony2: JavaScript does not work in Prod

The Dev environment works fine, but when I switch to Prod, it does nothing. It doesn't seem to connect event listeners (when I check items using Chrome, not a single event listener detects where they should). Any ideas? I cleared both caches, and maybe it’s important to say that I copied

_assetic:
resource: .
type:     assetic

from routing_dev.yml to routing.yml, because if I do not, I get the following internal server error:

request.CRITICAL: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Route "_assetic_f582f37" does not exist.")
+3
source share
1 answer

Have you dumped your asset files?

php app/console assetic:dump --env=prod --no-debug

http://symfony.com/doc/current/cookbook/assetic/asset_management.html#cookbook-assetic-dumping

+4
source

All Articles