roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

fix: set mjs as application/javascript in h5bp #1383

Closed kellymears closed 2 years ago

kellymears commented 2 years ago

Problem: nginx serves mjs as application/octet-stream and results in errors in the browser:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream".

This change sets mjs as application/javascript so that these files are served in accordance with the HTML specification.

kellymears commented 2 years ago

This integration test failure doesn't look like it's the result of my change, right?

retlehs commented 2 years ago

@kellymears no, probably fixed by #1384