I am trying to use require.js in a synfony2 project.
Here is the code in the main twig file:
<script data-main="{{ asset('bundles/web/js/main.js') }}" src="{{ asset('vendor/js/require.js') }}"> </script>
The vendor/js/require.js
file is loaded correctly, but for the bundles/web/js/main.js
I get the message:
Unprepared 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 solve the problem? Thank you
If you look at the original page, it looks like this:
<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 in the javascript console I get the following message:
GET http://localhost/~myName/myProject/web/app_dev.php/main.js?201205021855
404 (not found)
source share