I hosted my Angular app that compiled using the AOT compiler on Amazon S3. However, when I try to download the application, it gives me the following error

The application works fine with ng serve --aot
, but the same error will occur if I locally host the distribution on the python http server.
Update: I tried different workarounds and ways to make it work. But I could not fix it. I suspect that an error occurs when trying to create an assembly with the AOT compiler. When building using the ng build --aot
application works as intended.
I also discovered the problem on Github , since I could not find a solution, even after the problem.
source
share