February 2019
Beginner
694 pages
18h 4m
English
The only remaining task, then, is to incorporate this RequireConfig.js file into our browser HTML, as follows:
<html>
<head>
<script
type="text/javascript"
src="./node_modules/requirejs/require.js"
data-main="./RequireConfig" >
</script>
</head>
<body>
</body>
</html>
This is a very simple HTML file that has only a single <script> tag to load the "./node_modules/requirejs/require.js" file. This will cause the browser to load the require.js module loader. Note, however, that this script tag has an attribute named data-main. This data-main attribute is used by Require to load the initial configuration file, which in our case is RequireConfig.js. Again, Require will automatically append the .js extension for files, ...
Read now
Unlock full access