From 98722ee8d3116a8a0cad9c64cb53cc03b3902216 Mon Sep 17 00:00:00 2001 From: sripavantejb Date: Sat, 30 May 2026 13:12:33 +0530 Subject: [PATCH] docs: add ES module note to packages and modules page --- .../about-packages-and-modules.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx b/content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx index 3f31841d7e9..ae077e817b5 100644 --- a/content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx +++ b/content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx @@ -50,7 +50,7 @@ To be loaded by the Node.js `require()` function, a module must be one of the fo - A folder with a `package.json` file containing a `"main"` field. - A JavaScript file. -To use the `import` syntax, a module should also include `"type": "module"` in its `package.json` file: +Modern JavaScript projects can also use ES module syntax with `import` and `export`. In Node.js, ES modules are commonly enabled by setting `"type": "module"` in `package.json` or by using the `.mjs` file extension. For example, a `package.json` file can include: ```json {