资产不会加载产品

时间:2015-12-04 13:35:05

标签: javascript symfony assetic

我正在使用slick.js来显示旋转木马。开发中的一切工作正常,但似乎资源没有加载生产。我正在加载我的资产:

{% block javascripts %}
    {% javascripts
    '@MyUILayerBundle/Resources/public/vendor/jquery/1.11.1/jquery-1.11.1.min.js'
    '@MyUILayerBundle/Resources/public/vendor/handlebars/1.3.0/handlebars-v1.3.0.js'
    '@MyUILayerBundle/Resources/public/vendor/underscorejs/1.6.0/underscore-min.js'
    '@MyUILayerBundle/Resources/public/vendor/jquery.cookie/1.4.1/jquery.cookie-1.4.1.min.js'
    '@MyUILayerBundle/Resources/public/vendor/jquery-ui/1.11.0/js/jquery-ui.min.js'
    '@MyUILayerBundle/Resources/public/vendor/moment/min/moment-with-locales.min.js'
    '@MyUILayerBundle/Resources/public/vendor/alertify/0.3.11/js/alertify.min.js'
    '@MyUILayerBundle/Resources/public/vendor/select2/3.5.0/select2.min.js'
    '@MyUILayerBundle/Resources/public/vendor/select2/3.5.0/select2_locale_fr.js'
    '@MyUILayerBundle/Resources/public/vendor/oboe/oboe-browser.js'
    '@MyUILayerBundle/Resources/public/vendor/bootstrap/3.3.2/js/bootstrap.min.js'
    '@MyUILayerBundle/Resources/public/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js'
    '@MyUILayerBundle/Resources/public/vendor/jquery-json/jquery-json.js'
    '@MyUILayerBundle/Resources/public/vendor/slick/slick.js'
    '@MyUILayerBundle/Resources/public/vendor/typeahead/typeahead.js'
    output='bundles/main.js'
    %}
    <script type="text/javascript" src="{{  asset_url }}">
    </script>

    {% endjavascripts %}
{% endblock %}

在另一个文件中,我正在使用它:

$('.multiple-items').slick({
  infinite: true,
  slidesToShow: 3,
  slidesToScroll: 3
});

出于某种原因,旋转木马在开发中工作正常,但我在prod中出错,说光滑()不是函数。

知道为什么吗?

0 个答案:

没有答案