Ionic Angular app not working when deployed as static web site in S3

I have several apps deployed in S3 as static web sites that work well. I have one in particular that works well when tested locally and the deployed version in S3 shows a blank page when route is redirected to the home page. Permissions on the S3 bucket are correctly defined, static web configuration is also in the right way. Packages used:

"@angular/animations": "^16.0.0",
"@angular/common": "^16.2.8",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@capacitor/app": "5.0.6",
"@capacitor/core": "5.5.1",
"@capacitor/haptics": "5.0.6",
"@capacitor/keyboard": "5.0.6",
"@capacitor/status-bar": "5.0.6",
"@ionic/angular": "^7.5.4",
"ionicons": "^7.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"

Any idea?

I found a problem with the pages generated by Ionic for Angular standalone. The generated code imports IonicModule. Should be replaced to import individual elements (IonContent, IonGrid, …)