Opened 21 months ago
Last modified 3 months ago
#2216 new enhancement
Add .mjs to known JS MIME types
|Reported by:||Bradley Meck||Owned by:|
|uname -a:||Darwin LM-C02YV4YSLVDR 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64|
|nginx -V:||nginx version: nginx/1.19.5|
I was told to make a ticket here per the mailing list thread: http://mailman.nginx.org/pipermail/nginx-devel/2021-July/014176.html
Change History (4)
comment:1 by , 21 months ago
comment:2 by , 14 months ago
|Component:||documentation → other|
comment:3 by , 11 months ago
comment:4 by , 11 months ago
This is now defined by RFC 9239: https://www.rfc-editor.org/rfc/rfc9239 Two changes are needed in the nginx codebase:
- Second, the
.mjsextension is now explicitly registered.
The patch Maxim already pointed to addresses both points. What can we do to help get it reviewed + merged?
For the record, a few relevant links:
Overall seems to be only important in Node.js ecosystem, where the
.jsextension means project-default module type, while
.cjsmean ECMAScript and CommonJS modules, respectively. While it might be usable to distinguish modules from scripts in the web, there is no clear difference. It is also not clear if we need to provide support in the default mime.types.