Fwd: Proposal: Add .mjs file extension to known to be JS
Maxim Dounin
mdounin at mdounin.ru
Tue Jul 13 20:34:56 UTC 2021
Hello!
On Tue, Jul 13, 2021 at 12:48:51PM -0500, Bradley Farias wrote:
> The proposal instructions on the nginx website state that it is for
> bug fixes and so it seems that would be the wrong place to put a proposal.
> I can do so and cross reference.
Thanks for the ticket.
> To be clear; whatwg is using it in their specifications without any Node
> usage implied; if files are produced with that file extension by copy and
> pasting the specification examples (such as those in HTML Standard
> (whatwg.org)
> <https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-module-system>),
> they would fail on nginx.
Thanks for the details. That's the expected result of the change
made to the specification, with the false rationale that
extensions don't matter.
> There is also an IETF MIME update that should
> finally be published soon: draft-ietf-dispatch-javascript-mjs-09 -
> ECMAScript Media Types Updates
> <https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/> .
Looking forward for seeing it published.
> If the goal is not to be compatible, but only to apply to file extensions
> after they are popular, that seems a bit odd to me at least since it means
> knowing that upcoming things are potentially incompatible and willfully not
> preparing until after the problems occur.
We are not trying to support every possible extension or MIME type
out there in the default mime.types configuration snippet, so
there are lots of "potentially incompatible" things at any given
moment.
On the other hand, every nginx user is free to configure any
extensions and MIME types used by the particular server by using
the "types" configuration directive, so "potentially incompatible"
rather means "requires additional configuration", and this is
expected to be good enough until it is clear that the particular
extension or MIME type is popular enough to be added to default
mime.types.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list