Search code examples
javascriptrequirejsamdcommonjsbrowserify

Are Asynchronous Modules Always Asynchronous?


When multiple JavaScript modules are define()'d using AMD and concatenated into a single file, are those modules still considered asynchronous?


Solution

  • Yes, they are still considered async.

    While the module itself doesn't have to be loaded from disk, the modules do need to be executed and there is a call back made.

    Because you can combine SOME modules into a single file doesn't mean you have to combine all -- nor does RequireJS assume all there.

    It will run what it can from your preload and async load the rest.