ESM
Last updated
What is ESM?
ESM (ECMAScript Modules) is a standardized module system in JavaScript that allows for the organized, maintainable, and reusable structuring of code. It uses import and export statements for including and sharing functions, objects, or primitives between files. ESM supports static analysis, enabling better optimization and tooling, and is always in strict mode to reduce common JavaScript issues. Node.js fully supports ESM, which can be used with .mjs file extensions or configured in the package.json for .js files, making it easier to write modular and efficient JavaScript applications.
Free resources to learn ESM
- Official docsESM Documentation
More in stage 1: Introduction to Node.js
ESM: common questions
Can I learn ESM in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain ESM in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this ESM tutorial for beginners?
It is lesson 8 of 113 in the free Node.js roadmap, in stage 1, Introduction to Node.js. If you are new to Node.js, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.