I'm using ionic 6 and angular 12, I'm testing my app on browser and its working ok, the problem is when I try to test it on emulator or phone. I am inspecting it on chrome and it gives me these errors and after the splash screen it gives a blank screen.
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. runtime.js
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. main.js
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. polyfills.js
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. vendor.js
This is my index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Noz Terra</title>
<base href="./">
<meta name="color-scheme" content="light dark" />
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<link rel="icon" type="image/png" href="./assets/imgs/nozterra1.png" />
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>
<body>
<app-root>
</app-root>
</body>
</html>
And this is the index.html file generated in www folder when I compile(which I think is the root of the problem):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Noz Terra</title>
<base href="./">
<meta name="color-scheme" content="light dark"/>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="format-detection" content="telephone=no"/>
<meta name="msapplication-tap-highlight" content="no"/>
<link rel="icon" type="image/png" href="./assets/imgs/nozterra1.png"/>
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" href="styles.css"></head>
<body>
<app-root>
</app-root>
<script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="cordova.js" defer></script><script src="vendor.js" type="module"></script><script src="main.js" type="module"></script></body>
</html>