Hi all.
Node.js decided to use .mjs
file extension for ES Moduels.
this cause developer will write es modules in .mjs file and also serve to browser as is.
so http server who determine content-type via file extension should support .mjs
avoid to be content-type: octet-stream
the mime type for .mjs
are same as .js
as follow.
https://github.com/nodejs/node-eps/blob/master/002-es-modules.md#321-mime-of-mjs-files
so rails/actionpack/lib/action_dispatch/http/mime_types.rb better to add following line
Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript )
+ Mime::Type.register "text/javascript", :mjs, %w( application/javascript application/x-javascript )
any comments are welcome.
thanks
Jxck