diff --git a/doc/api/esm.md b/doc/api/esm.md index 135a904e2d79ba..2d1d4085e7359e 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -426,7 +426,7 @@ cache, to avoid duplication. The same object will be returned in CommonJS if the JSON module has already been imported from the same path. -Assuming an `index.js` with +Assuming an `index.mjs` with ```js @@ -437,8 +437,8 @@ The `--experimental-json-modules` flag is needed for the module to work. ```bash -node --experimental-modules --entry-type=module index.js # fails -node --experimental-modules --entry-type=module --experimental-json-modules index.js # works +node --experimental-modules index.mjs # fails +node --experimental-modules --experimental-json-modules index.mjs # works ``` ## Experimental Loader hooks @@ -593,9 +593,6 @@ of these top-level routines. _isMain_ is **true** when resolving the Node.js application entry point. -When using the `--entry-type` flag, it overrides the ESM_FORMAT result while -providing errors in the case of explicit conflicts. -
Resolver algorithm specification