Skip to Content
Get Programming with JavaScript Next
book

Get Programming with JavaScript Next

by JD Isaacks
May 2018
Intermediate to advanced content levelIntermediate to advanced
376 pages
9h 22m
English
Manning Publications
Content preview from Get Programming with JavaScript Next

Unit 4. Modules

Until recently, most front-end applications followed the same paradigm for using libraries: exposing globals. For example, if someone wanted to use jQuery (https://jquery.com) in a project, they would need to go to jQuery’s website, download either jquery.js or jquery.min.js, add it to their projects’s js or vendor folder, and then include a <script> tag importing the library into their application. This was not ideal, because it required modules to export themselves using global variables that could potentially collide with other global variables. It also required dependencies to be included before any library that relied on them or there would be an error.

Modules solve these problems by allowing scripts to be included by ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Get Programming with JavaScript

Get Programming with JavaScript

John Larsen
Rediscovering JavaScript

Rediscovering JavaScript

Venkat Subramaniam

Publisher Resources

ISBN: 9781617294204Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link