Modules in JavaScript confusion

View other answers to this thread
Matt Strom's photo

Unfortunately, modules (more precisely, CommonJS modules) are not natively available in the browser. You need to use another module systems such as RequireJS, SystemJS, Browserify, Webpack, or the Universal Module Definition (UMD) pattern to use modules in the browser.

Also unfortunately, those are not the easiest libraries to use.

Jason Knight's photo

The less code you use, the less there is to break

The "not natively available in browsers" being just part of why I've had little reason to even touch them.

That and it seems like a crutch for people who can't organize their code properly.