Closed kriskowal closed 10 years ago
@kriskowal could you expand on the problem this fixes?
An “entry page” is a file that has a <script>
that loads either the Montage or Mr bootstrap script. This script gets transformed into a bootstrapping bundle, including the transitive dependencies of the root component. There may be subsequent preload bundles. The preload bundles must end with a call to bundleLoaded
with their own file name, relative to the entry page. However, before these changes, the given name is relative to the project root.
Currently, all entry pages that are in the root directory of a project, those in the same directory as the package.json
, work fine, but this is just by coincidence. If the entry page is in a subdirectory, the preloader is never made aware when the preloading bundles are finished executing.
I've verified this fix locally and written a mop-integration test, but it's not running at the moment because of a problem with the url2 module.
I’ll have a fix for https://github.com/kriskowal/url2/issues/3 soon.
Code looks fine. Seem like this is slightly awkward to test...