Hi everyone!
I’m in trouble right here.
I have build my react app when I install an android app my console showing this: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
When I open logcat for android, found this: 2021-08-07 11:23:13.472 23203-23203/****/chromium: [INFO:CONSOLE(0)] "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.", source: file:///android_asset/www/assets/index.b8f6f455.js (0)
Have someone get in this trouble too?
I’m developed with f7 about years, and never get this, I’m in this about 3 or 4 days, my code looks fine … thinking that was something from build …
I dont know why, but try to create a new framework7 project from framework7 create --ui with REACT, and try to build to android, when install in a android app, appears like this
I found the solution … when I see the image, at url you can see that my file are hosted by file:// and modules can only be used as served, so, just need to add an webview like cordova-plugin-ionic-webview whose create a localhost server only by adding the plugin