By default Hugo doesn’t serve .mjs files with the correct content type. In fact it wasn’t until recently that hugo could serve more than one file extension per mime-type. It looks like with v0.43 this has been fixed.
[mediaTypes] [mediaTypes.“text/javascript”] suffixes = [“js”, “mjs”]
The above code lets me serve mjs files for ES Modules with the correct mime-type (note modules need to be served with ‘text/javascript’). This is only needed for local testing, hosting is another issue :)