Configuring hugo server to serve 'mjs' ES modules
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”] Read full post. 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’).