Angular Uncaught TypeError: e is not a constructor after build --prod (work on ng serve)

后端 未结 2 1226
感动是毒
感动是毒 2021-02-20 15:59

I have a problem while uploading my angular application to production . The application works just fine in development and used to work before on production too.

To bui

2条回答
  •  遥遥无期
    2021-02-20 16:39

    after a long time of trying, I discovered that there is an open bug at angular cli

    https://github.com/angular/angular-cli/issues/9929

    ng build --prod --base-href="/site/" --aot=false --build-optimizer=false

    and for now using --aot=false --build-optimizer=false temporarily solves the problem.

    Ill keep the post updated with official the information and solution that angular team will provide.

提交回复
热议问题