How it works...

When Require.Js loads a script tag, it first executes a module defined in the data-main attribute. If that module has a config() method, RequireJS fetches the required files over the network.

Every define() method defines a new module with the same name as its filename. Every require() method loads the required module over the network asynchronously.

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.