Try adding @angular-devkit/build-optimizer
as a package in the package.json file.
"dependencies": {
"@angular-devkit/build-optimizer": "^0.4.0",
...
}
This allows the post-install flag --aot
to run. For some reason this package isn't built in anymore.