---
title: "Discussion on \"The Complete Guide to ES Modules in Browsers and Node.js\" | Hashnode"
description: "Discussion on \"The Complete Guide to ES Modules in Browsers and Node.js\". How to use ES2015 Modules (ESM), use CommonJS, import one into the other, and avoid the gotchas."
url: "https://hashnode.com/posts/es-modules-browsers-nodejs/634a9b4036153a67705247ba"
---

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

Discussion

# [The Complete Guide to ES Modules in Browsers and Node.js](https://blog.craigbuckler.com/es-modules-browsers-nodejs?utm_source=hashnode&utm_medium=feed)

How to use ES2015 Modules (ESM), use CommonJS, import one into the other, and avoid the gotchas.

Oct 15, 2022 · 9 min read · blog.craigbuckler.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#modules](https://hashnode.com/tag/modules)
-   [#ecmascript](https://hashnode.com/tag/ecmascript)

## Written by

[Craig Buckler](https://hashnode.com/@craigbuckler)

@craigbuckler · Exmouth, UK

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

Freelance UK full stack web developer who writes tutorials now and again.

I am a freelance UK full-stack web developer with a few decades experience.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
