I am trying to use require.js in synfony2 project.
Here the code in the main twig file:
<script
data-main="{{ asset('bundles/web/js/main.js') }}"
src="{{ asset('vendor/js/require.js') }}">
</script>
The file vendor/js/require.js
is correctly loaded but for the file bundles/web/js/main.js
I get the message:
Uncaught Error: Load timeout for modules: mainApp.js?201205021855 http://requirejs.org/docs/errors.html#timeout
I am using RequireJS 1.0.8. Any idea how to fix the problem? Thanks.
If I look to the source page it looks like:
<script
data-main="/~myName/myProject/web/bundles/web/js/main.js?101205021855"
src="/~myName/myProject/web/vendor/js/require.js?101205021855">
</script>
So the paths are rights, but on javascript console I get the following message:
GET
http://localhost/~myName/myProject/web/app_dev.php/main.js?201205021855
404 (Not Found)