【发布时间】:2019-11-16 06:29:48
【问题描述】:
我有一个 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.
在某些情况下,我们仅通过重新加载页面即可解决此问题,但在其他情况下,无论我做什么,页面都无法加载。
我做了一些研究,发现这可能与注册服务工作者的应用程序有关,但这不是我的情况。
另外,由于我使用 Firebase 托管服务于一个静态站点,因此我没有进行任何 MIME 配置。
谁能帮帮我?
【问题讨论】:
标签: angular firebase electron firebase-hosting