---
title: "Discussion on \"Understanding CJS and ESM Imports and Exports\" | Hashnode"
description: "Discussion on \"Understanding CJS and ESM Imports and Exports\". Understand the differences between CommonJS (CJS) and ECMAScript Modules (ESM) in JavaScript, their uses, and best practices"
url: "https://hashnode.com/posts/understanding-cjs-and-esm-imports-and-exports/66b884a35ef9361df930a3bd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Understanding CJS and ESM Imports and Exports](https://nirmalsankalana.hashnode.dev/understanding-cjs-and-esm-imports-and-exports?utm_source=hashnode&utm_medium=feed)

Understand the differences between CommonJS (CJS) and ECMAScript Modules (ESM) in JavaScript, their uses, and best practices

Aug 11, 2024 · 5 min read · nirmalsankalana.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#js](https://hashnode.com/tag/js)
-   [#commonjs](https://hashnode.com/tag/commonjs)
-   [#ecmascript](https://hashnode.com/tag/ecmascript)
-   [#javascript-modules](https://hashnode.com/tag/javascript-modules)

## Written by

[Nirmal Sankalana](https://hashnode.com/@nirmalsankalana)

@nirmalsankalana · Sri Lanka

  
[View profile](https://hashnode.com/@nirmalsankalana)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
