liveBook · Manning

ECMAScript module

An ECMAScript module is a separately scoped JavaScript unit whose dependencies and shared bindings are declared with import and export syntax.

How 2 Manning books explain it

Secrets of the JavaScript Ninja, Third Edition

A JavaScript module whose dependencies and shared bindings are declared using standardized import and export syntax.

How it is used
Organizes JavaScript into self-contained files with explicit dependencies instead of ordered scripts and shared globals.
How deep it goes
Explains export forms, live bindings and import timing, then traces specifier resolution to runtime-specific configuration.
Examples
Uses a Node.js calculator, a package with root and subpath exports, and an HTML import map.
What you can do after
Operate/configure ESM in Node.js packages and browser pages, choosing static or runtime imports and recognizing CommonJS compatibility pitfalls.

Read how Secrets of the JavaScript Ninja, Third Edition explains ECMAScript module →

Vanilla Web

An ECMAScript module is a separately scoped JavaScript module with explicit import and export bindings.

How it is used
Organizes browser application logic and distributes small libraries or custom elements without requiring a framework.
How deep it goes
Explains scope, graph construction, linking, live bindings, single evaluation, exports, and side-effect control; only names advanced loading options.
Examples
Uses named and default exports, a module-script entry, a custom-element distribution file, and a legacy fallback.
What you can do after
Build it from scratch as browser-loaded files with explicit imports and exports, while controlling initialization and checking compatibility.

Read how Vanilla Web explains ECMAScript module →

What to know first

Related concepts

Questions about ECMAScript module

What is ECMAScript module?

An ECMAScript module is a separately scoped JavaScript unit whose dependencies and shared bindings are declared with import and export syntax.

Which Manning books explain ECMAScript module?

Secrets of the JavaScript Ninja, Third Edition and Vanilla Web.

What should I know before learning ECMAScript module?

Manning books that teach ECMAScript module usually introduce ECMAScript 2015, JavaScript and TypeScript first.

What is the difference between ECMAScript module and CommonJS?

An ECMAScript module is a separately scoped JavaScript unit whose dependencies and shared bindings are declared with import and export syntax. CommonJS is a JavaScript module-system specification that defines how modules export and load values, traditionally using synchronous require calls and module.exports assignments.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.