From 8a10b50b6732176ac4335752045e3d7f4545443b Mon Sep 17 00:00:00 2001 From: himself65 Date: Sun, 28 Jul 2019 00:25:50 +0800 Subject: [PATCH] doc: correct import statement JSON file can be imported now PR-URL: https://github.com/nodejs/node/pull/28876 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- doc/api/esm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 14035cbf5ca243..0dc2038121cf34 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -381,8 +381,8 @@ To include an ES module into CommonJS, use [`import()`][]. ### import statements -An `import` statement can reference either ES module or CommonJS JavaScript. -Other file types such as JSON and Native modules are not supported. For those, +An `import` statement can reference an ES module, a CommonJS module, or JSON. +Other file types such as Native modules are not supported. For those, use [`module.createRequire()`][]. `import` statements are permitted only in ES modules. For similar functionality