I want to learn the core principle of modular loader. Now it can dynamically load files and prevent overloading, but at present, it is stuck in the callback function to receive parameters. Please give me some advice. Thank you.
for example:
A.js
require([""],function(){
//
});
B.js
define(function(){
// A
})
I understand that the callback function is executed after dynamically loading the module, but I don"t know how this parameter is passed, how the callback function gets the return result of the module, and what is the intermediate key between them? If you can give a simple demo will be very grateful, text description of the principle is also OK, thank you.