Motivation
Motivation
Today’s websites are evolving into web apps:
- More and more JavaScript is being used.
- Modern browsers are offering a wider range of interfaces.
- Fewer full page reloads → even more code in a page.
As a result there is a lot of code on the client side!
A big code base needs to be organized. Module systems offer the option to split your code base into modules.
Module system styles
There are multiple standards for how to define dependencies and export values:
-
<script>
-tag style (without a module system) - CommonJS
- AMD and some dialects of it
- ES6 modules
- and more…
<script>
-tag style
This is how you would handle a modularized code base if you didn’t use a module system.
<script