I have a requirejs project that has been optimized into a single file, which I am loading synchronously. The code loads as expected, but the modules are still loading asynchronous (they aren't available until later in the loading process) and it's causing problems for some legacy code I'm hoping it will work with.
Given the code below, is there any way of making main-build's methods available immediately after loading, before legacy_code.js is loaded?
<script type="text/javascript" src="/scripts/vendor/require.js"></script>
<script type="text/javascript" src="/scripts/main-build.js"></script>
<!-- At this point, the code is set up and it will be invoked later -->
<!-- ...but the next file requires to access methods in the modules.-->
<script type="text/javascript" src="/script/legacy_code.js"></script>
If worst comes to worst, I can write my own versions of define() and require() (which would also free up a lot of bandwidth since all it would need to do is catalogue and invoke the modules), but I'm hoping there's a built-in way to do this.