Assetic management is the hardest part to understand IMHO, even after playing a year or more with Symfony. Anyways, I was experimenting with named assets:
assets:
mybundle_front_js:
inputs:
- @MeMyBundle/Resources/public/jquery/dist/jquery.js
- @MeMyBundle/Resources/public/bootstrap/js/affix.js
- @MeMyBundle/Resources/public/bootstrap/js/alert.js
- @MeMyBundle/Resources/public/bootstrap/js/button.js
- @MeMyBundle/Resources/public/bootstrap/js/carousel.js
- @MeMyBundle/Resources/public/bootstrap/js/collapse.js
- @MeMyBundle/Resources/public/bootstrap/js/dropdown.js
- @MeMyBundle/Resources/public/bootstrap/js/modal.js
- @MeMyBundle/Resources/public/bootstrap/js/tooltip.js
- @MeMyBundle/Resources/public/bootstrap/js/popover.js
- @MeMyBundle/Resources/public/bootstrap/js/scrollspy.js
- @MeMyBundle/Resources/public/bootstrap/js/tab.js
- @MeMyBundle/Resources/public/bootstrap/js/transition.js
filters: [?uglifyjs2]
Using the named asset:
{% block javascripts %}
{% javascripts
"@mybundle_front_js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
Dumping them:
php app/console cache:clear --env=prod
php app/console assetic:dump --env=prod
Result is two files, same size same content:
%kernel.root_dir%/../web/assetic/mybundle_front_js.js
%kernel.root_dir%/../web/js/055a364.js
Is there any reason to produce two identical files in prod environment?