Scratch-Client-4 / itchy-cordova

📱 Cordova-based mobile client for Scratch
17 stars 4 forks source link

Failed to load module script #14

Closed micahlt closed 4 years ago

micahlt commented 4 years ago

When running the application on an emulated Google Pixel 3XL device running Android 10, the JavaScript that powers the application does not execute. The logs say:

Failed to load module script: The server responded with a non-JavaScript MIME type of "".
Strict MIME type checking is enforced for module scripts per HTML spec.

Research on Stack Overflow claims that this is easily solvable by simply serving the files on a local server. However, as we're using Cordova (PhoneGap), this is not possible. We need the file scripts/index.js to import statically without being on a server.

moeenio commented 4 years ago

Doesn't Cordova make a local web server?

micahlt commented 4 years ago

Not to my knowledge...

micahlt commented 4 years ago

Fixed this - Cordova does not support importing scripts as modules.

moeenio commented 4 years ago

And if stuff goes on well we will use parcel to bundle everything