admin管理员组文章数量:1290499
I want to wrap an angular application with cordova.
After hitting "cordova run android"
and inspecting it in Chrome, the console states:
"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."
On my phone I obviously only get a white screen then. How can I solve this issue?
When i hit "cordova serve"
and look at it in the browser on my PC, there are no errors thrown and everything works fine.
Thank you in advance.
MIME type of ""
I want to wrap an angular application with cordova.
After hitting "cordova run android"
and inspecting it in Chrome, the console states:
"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."
On my phone I obviously only get a white screen then. How can I solve this issue?
When i hit "cordova serve"
and look at it in the browser on my PC, there are no errors thrown and everything works fine.
Thank you in advance.
MIME type of ""
Share Improve this question edited Jun 27, 2019 at 20:39 Darius asked Jun 26, 2019 at 18:05 DariusDarius 1711 silver badge9 bronze badges1 Answer
Reset to default 13I could figure it out, even if it is not a great solution I guess and there might be something nicer.
After running ng build --prod --aot
I went into my index.html and put
type="text/javascript"
into the <script>
tags.
So basically from
<script src="runtime-es2015.858f8dd898b75fe86926.js" type="module">
to
<script type="text/javascript" src="runtime-es2015.858f8dd898b75fe86926.js" type="module">
After that I got no more errors.
本文标签: androidServer responds with a nonJavaScript MIME type of quotquotStack Overflow
版权声明:本文标题:android - Server responds with a non-JavaScript MIME type of "" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741499526a2381992.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论