【问题标题】:Angular 8 ng-build throwing MIME error in Firefox and 404 in ChromeAngular 8 ng-build 在 Firefox 中抛出 MIME 错误,在 Chrome 中抛出 404
【发布时间】:2020-03-24 07:58:08
【问题描述】:

在 github 页面上部署我的 Angular 应用程序后,它不会在 www.https://www.lorem.com/ 在线呈现,页面只是空白,我在控制台中有错误。

在 Firefox 上它说:

在 Chrome 上显示:

知道可能是什么问题吗?

【问题讨论】:

  • 为什么我被否决了?

标签: angular github-pages mime


【解决方案1】:

base href 似乎有问题,因为www.illiteratiartandcowork.com/theotherspace/ 中没有文件,请尝试将 github 上 docs 文件夹中 index.html 中的 base href="/theotherspace/" 更改为 base href="/"

从这个 url 我得到正确的 css 文件(它也适用于其他文件) https://www.illiteratiartandcowork.com/styles.a400f1df2c914132955e.css

【讨论】:

    猜你喜欢
    • 2019-10-29
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    • 1970-01-01
    • 1970-01-01
    • 2018-12-09
    • 1970-01-01
    • 2013-03-28
    相关资源
    最近更新 更多