RequireJS must be added to the web page by CDN, or by downloading the require.js file from http://requirejs.org/docs/download.html.
In this example, we'll develop a simple to-do list app that looks as follows:
Let's create a simple HTML5 file and add Bootstrap and RequireJS from CDN as follows:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Simple ToDo app using RequireJs</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous"> <script data-main="scripts/main" ...