Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65837

AMD modules loaded by YUI on pageload lead to duplicate requirejs loads

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.7, 4.0.8
    • None
    • JavaScript

    Description

      1. Create a new glossary with autolinking enabled
      2. Add a new glossary entry
      3. Enable the Glossary filter
      4. Add some text to the course page to show the glossary link
      5. View the dev tools => Network tab, and reload the page
        1. Note: first.js loaded
        2. Note: event.js loaded

      I'd hazard a guess that requirejs is loading first.js async in the background at the time that event.js is loaded, and as a result event.js is also fetched.

      Ideally requirejs needs to only load -lazy items, but I don't think that's possible. We may have to change the requirejs loader to load first.js sync so that it blocks but that's not a great solution either.

      https://moodle.org/mod/forum/discuss.php?d=377578#p1559908

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dobedobedoh Andrew Lyons
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: