Fel*_*ipe 5 firebase firebase-hosting electron angular
我有一个Angular 8应用程序,该应用程序托管在Firebase上,并通过以下方式在客户端运行:Go-Astilectron(Astilectron 0.30和Electron 4.0.1)。
问题是我在某些客户端中遇到了以下错误(此错误正好在加载Angular代码时发生,因此Astilectron仅显示空白页):
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
main-es2015.5a90aaf45a8347384655.js:1
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Run Code Online (Sandbox Code Playgroud)
在某些情况下,我们设法通过重新加载页面来解决此问题,但在其他情况下,无论我做什么,该页面都不会加载。
我进行了一些研究,发现这可能与注册服务工作者的应用程序有关,但这不是我的情况。
另外,由于我使用Firebase Hosting服务静态站点,因此未进行任何MIME配置。
谁能帮我?
可以肯定的是,在index.html将head包括:
<base href="/">
Run Code Online (Sandbox Code Playgroud)
参见:https : //github.com/angular/angular-cli/issues/10325#issuecomment-399329033
在注册表 mime 类型设置不正确的 Windows 机器上运行 Python 服务器时,也会发生此错误。
参见:https : //github.com/pallets/flask/issues/1045#issuecomment-42202749
| 归档时间: |
|
| 查看次数: |
1034 次 |
| 最近记录: |