ES modules là hệ thống module chính thức của JavaScript. export để export bindings, import để import. Static analysis: imports/exports được phân tích tại parse time, không thể dynamic (dùng import() cho dynamic). Module có own scope, strict mode by default.
Live bindings là đặc điểm quan trọng của ES modules: imported binding là reference đến exported value, không phải copy. Nếu module xuất let count = 0 và tăng nó, người import sẽ thấy giá trị mới nhất — khác CommonJS require() vốn copy value tại thời điểm require. Điều này quan trọng khi import singleton objects hay shared state.
ES modules are JavaScript's official module system. export exports bindings, import imports them. Static analysis: imports/exports are analyzed at parse time; use import() for dynamic imports. Modules have their own scope and strict mode by default.
Live bindings are a key ES module distinction: an imported binding is a reference to the exported value, not a copy. If a module exports let count = 0 and increments it, importers see the updated value — unlike CommonJS require() which copies the value at require time. Important when importing singletons or shared state.