From 49d7280e432e6e55b2691c14b96884fbbccbfd09 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Tue, 21 Jun 2022 20:17:39 +0300 Subject: [PATCH 1/2] improve esm docs - clarify extension resolving --- src/content/guides/ecma-script-modules.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/guides/ecma-script-modules.mdx b/src/content/guides/ecma-script-modules.mdx index 78d697c1a449..5ad578cf2611 100644 --- a/src/content/guides/ecma-script-modules.mdx +++ b/src/content/guides/ecma-script-modules.mdx @@ -79,7 +79,7 @@ In DataURIs using the `text/javascript` or `application/javascript` mime type wi In addition to the module format, flagging modules as ESM also affect the resolving logic, interop logic and the available symbols in modules. -Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension. +Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. `*.js` or `*.mjs`) to disable this behaviour set [`fullySpecified=false`](/configuration/module/#resolvefullyspecified). T> Requests to packages e.g. `import "lodash"` are still supported. From 58e9ea055806d8bbb829a134301777589a64a3d3 Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Fri, 24 Jun 2022 12:37:04 +0800 Subject: [PATCH 2/2] Update src/content/guides/ecma-script-modules.mdx --- src/content/guides/ecma-script-modules.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/guides/ecma-script-modules.mdx b/src/content/guides/ecma-script-modules.mdx index 5ad578cf2611..61e432e178b3 100644 --- a/src/content/guides/ecma-script-modules.mdx +++ b/src/content/guides/ecma-script-modules.mdx @@ -79,7 +79,7 @@ In DataURIs using the `text/javascript` or `application/javascript` mime type wi In addition to the module format, flagging modules as ESM also affect the resolving logic, interop logic and the available symbols in modules. -Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. `*.js` or `*.mjs`) to disable this behaviour set [`fullySpecified=false`](/configuration/module/#resolvefullyspecified). +Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. `*.js` or `*.mjs`) unless you have the behaviour disabled with [`fullySpecified=false`](/configuration/module/#resolvefullyspecified). T> Requests to packages e.g. `import "lodash"` are still supported.