JavaScript modules
· 20 min read
JavaScript modules are now supported in all major browsers!
This article explains how to use JS modules, how to deploy them responsibly, and how the Chrome team is working to make modules even better in the future.
What are JS modules?
JS modules (also known as “ES modules” or “ECMAScript modules”) are a major new feature, or rather a collection of new features. You may have used a userland JavaScript module system in the past. Maybe you used CommonJS like in Node.js, or maybe AMD, or maybe something else. All of these module systems have one thing in common: they allow you to import and export stuff.