且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Angular 8 ng-build使用Cordova抛出MIME错误

更新时间:2023-11-15 20:32:46

我遇到了同样的问题.

  1. 创建了一个新项目.
  2. 构建生产版本

  1. Created a new project.
  2. Built a production version

  "build-production": "ng build --configuration=production --extract-css=false --prod --aot"

  • 已部署到NGINX

  • Deployed to NGINX

    修复

    更新tsconfig.json

    Update tsconfig.json

            "target": "es5",
    

    然后重建应用程序并再次部署.

    Then rebuild the application and deploy again.

    此解决方案为我工作,现在我已部署的应用程序中包含内容.

    This solution worked for me, I now have content in my deployed app.

    希望它对某人有帮助