Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Commit 49791b4

Browse files
Fix typos
1 parent 5c9e8d5 commit 49791b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

proposals/esm-in-js-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ importCommonJS(import.meta, './commonjs-file.js');
2525
2626
If a user wants to use the `import` statement to import a CommonJS file, that file needs to have a `.cjs` extension. This would allow intermixing of ESM `.js` files and CommonJS `.cjs` files, and potentially the use of CommonJS in browser environments. The `.cjs` extension would map to `application/node`, even on the Web.
2727
28-
Since no `.cjs` files currently exist, this solution either requires renaming files or creating symlinks, e.g. `file.cjs` pointing at `file.js`. This solution definitively ends the ambiguity inherent in the `.js` extension: a user could use `.mjs` and `.cjs` exclusively and purse ambiguity from their filenames.
28+
Since no `.cjs` files currently exist, this solution either requires renaming files or creating symlinks, e.g. `file.cjs` pointing at `file.js`. This solution definitively ends the ambiguity inherent in the `.js` extension: a user could use `.mjs` and `.cjs` exclusively and purge ambiguity from their filenames.
2929
3030
### `package.json` flag to tell Node how to handle `.js` files
3131
32-
This would be https://github.com/nodejs/node/pull/18392 or something like it. That PR proposes a `"mode": "esm"` to tell Node that all `.js` files within that `package.json`’s package boundary should be treated as ESM files.
32+
This would be [nodejs/node/pull/18392](https://github.com/nodejs/node/pull/18392) or something like it. That PR proposes a `"mode": "esm"` to tell Node that all `.js` files within that `package.json`’s package boundary should be treated as ESM files.
3333
3434
### `package.json` section to tell Node how to handle any file
3535
36-
Similar to https://github.com/nodejs/node/pull/18392, but this would be a new section in `package.json` where the user can treat Node like a configurable webserver, and define the MIME types it should use to “serve” files that get imported:
36+
Similar to [nodejs/node/pull/18392](https://github.com/nodejs/node/pull/18392), but this would be a new section in `package.json` where the user can treat Node like a configurable webserver, and define the MIME types it should use to “serve” files that get imported:
3737
3838
```json
3939
"mimes": {

0 commit comments

Comments
 (0)