From db9a07d14c280fdd98525e945f8978a2ec3e6cf9 Mon Sep 17 00:00:00 2001 From: Bradley Farias Date: Wed, 9 Aug 2017 08:37:45 -0500 Subject: [PATCH 1/3] clarify the exact MIME for .mjs --- 002-es-modules.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/002-es-modules.md b/002-es-modules.md index 5000bbd..d5adba1 100644 --- a/002-es-modules.md +++ b/002-es-modules.md @@ -79,6 +79,10 @@ once the Node resolution algorithm reaches file expansion, the path for path + `.mjs` would throw an error. In order to support loading ESM in CJS files please use `import()`. +#### 3.2.1 MIME of `.mjs` files + +The MIME used to identify `.mjs` files should be a [web compatible JavaScript MIME Type](https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type), preferably `application/javascript`. + ### 3.3. ES Import Path Resolution From 086407733ffe5cf6198099aaa2fc62ed3afeb1f4 Mon Sep 17 00:00:00 2001 From: Bradley Farias Date: Wed, 9 Aug 2017 11:25:02 -0500 Subject: [PATCH 2/3] link to WHATWG and use text/javascript --- 002-es-modules.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/002-es-modules.md b/002-es-modules.md index d5adba1..0ab4818 100644 --- a/002-es-modules.md +++ b/002-es-modules.md @@ -81,7 +81,8 @@ please use `import()`. #### 3.2.1 MIME of `.mjs` files -The MIME used to identify `.mjs` files should be a [web compatible JavaScript MIME Type](https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type), preferably `application/javascript`. +The MIME used to identify `.mjs` files should be a [web compatible JavaScript MIME Type](https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type). +In accordance with the default value listed in the [HTML Specification dependencies section](https://html.spec.whatwg.org/#dependencies) it should be identified as `text/javascript` preferably. ### 3.3. ES Import Path Resolution From b5240fa43f39c252f44830b50f82cdbaaeb8c90b Mon Sep 17 00:00:00 2001 From: Bradley Farias Date: Mon, 14 Aug 2017 09:53:15 -0500 Subject: [PATCH 3/3] remove advisory preference of text/javascript --- 002-es-modules.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/002-es-modules.md b/002-es-modules.md index 0ab4818..1d23631 100644 --- a/002-es-modules.md +++ b/002-es-modules.md @@ -81,8 +81,7 @@ please use `import()`. #### 3.2.1 MIME of `.mjs` files -The MIME used to identify `.mjs` files should be a [web compatible JavaScript MIME Type](https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type). -In accordance with the default value listed in the [HTML Specification dependencies section](https://html.spec.whatwg.org/#dependencies) it should be identified as `text/javascript` preferably. +The MIME used to identify `.mjs` files should be a [web compatible JavaScript MIME Type](https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type). ### 3.3. ES Import Path Resolution