Opened 2 weeks ago

Last modified 2 weeks ago

#2216 new enhancement

Add .mjs to known JS MIME types

Reported by: Bradley Meck Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.19.x
Keywords: mime js javascript Cc:
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:

.mjs is supported by Node.js, is in JS specification examples ( E.G. ), and WHATWG specification examples ( ), and has an upcoming MIME update per IETF ( ). It is also supported by various existing MIME databases and serves properly on various hosts like Github Pages without custom configuration.

Change History (1)

comment:1 by Maxim Dounin, 2 weeks ago

For the record, a few relevant links:

Overall seems to be only important in Node.js ecosystem, where the .js extension means project-default module type, while .mjs and .cjs mean 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.

Note: See TracTickets for help on using tickets.