Hi @SanctumSanctorum,
Thank you for your detailed bug report!
It sounds like you’re encountering a MIME type issue with loading JavaScript module scripts. Specifically, you might see an error message like this in your browser:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/plain”. Strict MIME type checking is enforced for module scripts per HTML spec.
If you are seeing this error, it may be related to how your system is configured to handle .js
files. We use the mimetypes
library to determine the MIME type, which reads data from your Windows registry.
Please check the following registry key:
HKEY_CLASSES_ROOT\.js
Ensure that the Content Type
is set to application/javascript
instead of text/plain
. Make sure to back up your registry before making any changes.
To make it easier, here is a registry file you can use to set the correct values:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.js]
@="JSFile"
"Content Type"="application/javascript"
"PerceivedType"="text"
After updating this key, you won’t need to restart your PC; just restart the game, and everything should work fine.
If the issue persists or if the Content Type
is already set correctly, please provide us with more details about the error.
Regarding why you didn’t encounter this issue in v0.5.8.74:
In that version, we used the following code:
<script src="/public/js/xxx.js" defer></script>
In later versions, we updated the code to:
<script type="module">
import { XXX } from "/public/js/xxx.js";
This change may have introduced stricter MIME type requirements.
Thank you for your patience, and we look forward to resolving this issue!