jrburke/requirejs — Issue #127: Bundling require into optimized files that are dependencies may cause IE double loading
Author: plumlee
Created: 2011-10-09 19:31:17+00:00
State: open

Sorry for the odd title and the lack of true technical details below.

Setup: we have several bundled/optimized files that were including require.js so they could be used standalone, or as part of a package. If those modules were included as part of the require dependencies for a file 'foo.js', and the file was then specified as the 'data-main' attribute of require, IE would parse the file and throw an error when it could not find any of the objects that should have been loaded as dependencies.

But IE would then trigger a second load of the file foo.js once the optimized file (and the bundled version of require) was loaded, this time finding the dependencies correctly, and would then continue to parse the file and render the page. Viewing the rendered source of the file with the IE developer tools showed two instances of foo.js in head along with doubles of the bundled files.

This may be related to issue #82, as we saw stack overflow errors in this situation with anything that recursed too heavily. Those seem to have gone away now.

I will try to have a test case available soon, but wanted to make this public in case others have had experience with this issue.