hearsayit / HearsayRequireJSBundle

RequireJS integration for Symfony2.
130 stars 55 forks source link

extra template neccessary for require.js #48

Closed VStoltzenberg closed 10 years ago

VStoltzenberg commented 10 years ago

Instead of using //cdnjs.*.require.min.js as require_js_src in the config, we used to point directly to the js file hosted on our server. Now we had to create a twig template which we have to load, which does nothing but point to the js asset.

To clarify: Before in our config: hearsay_require_js: require_js_src: '/bundles/demofrontend/js/vendors/require.min.js'

hearsay_require_js: require_js_src: 'DemoFrontendBundle::Page/Components/requirejs.html.twig'

in our requirejs.html.twig: does nothing but load the js asset.

I would be glad to hear about a fix for this problem

ihortymoshenko commented 10 years ago

@VStoltzenberg, the old configuration is not working for you? I'm surprised to see such approach to specify the path to the RequireJS. As for me, there is no nothing special in using template. However, I agree that is not the best way.