>cd C:\"Program Files"\"IIS Express"
>appcmd set config /section:staticContent /+[fileExtension='.mjs',mimeType='text/javascript']
会提示:
已经在配置提交路径“MACHINE/WEBROOT/APPHOST”向“MACHINE/WEBROOT/APPHOST”的“system.webServer/staticContent”节应用了配置更改
或者在web.config下添加
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mjs" mimeType="text/javascript" />
</staticContent>
</system.webServer>