You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/guides/ecma-script-modules.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ import theDefaultValue from './module.js';
63
63
64
64
By default webpack will automatically detect whether a file is an ESM or a different module system.
65
65
66
-
Node.js estabilished a way of explicitly setting the module type of files by using a property in the `package.json`.
66
+
Node.js established a way of explicitly setting the module type of files by using a property in the `package.json`.
67
67
Setting `"type": "module"` in a package.json does force all files below this package.json to be ECMAScript Modules.
68
68
Setting `"type": "commonjs"` will instead force them to be CommonJS Modules.
69
69
@@ -75,11 +75,11 @@ Setting `"type": "commonjs"` will instead force them to be CommonJS Modules.
75
75
76
76
In addition to that, files can set the module type by using `.mjs` or `.cjs` extension. `.mjs` will force them to be ESM, `.cjs` force them to be CommonJs.
77
77
78
-
In DataURIs using the `text/javascript` or `application/javascript`mimetype will also force module type to ESM.
78
+
In DataURIs using the `text/javascript` or `application/javascript`mime type will also force module type to ESM.
79
79
80
80
In addition to the module format, flagging modules as ESM also affect the resolving logic, interop logic and the available symbols in modules.
81
81
82
-
Imports in ESM are resolved more stictly. Relative requests must include a filename and file extension.
82
+
Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension.
83
83
84
84
T> Requests to packages e.g. `import "lodash"` are still supported.
0 commit comments