# CSS classes missing when building project

**URL:** <https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126>\
**Category:** Capacitor\
**Created:** [March 5, 2024, 11:37am UTC](https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126 "2024-03-05T11:37:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RickGroenewegen](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rickgroenewegen/32/143221_2.png) [@RickGroenewegen](https://forum.ionicframework.com/u/RickGroenewegen)\
**Post date:** [March 5, 2024, 11:37am UTC](https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126/1 "2024-03-05T11:37:32Z")

</div>

I’m having a problem with my CSS breaking when trying to build my capacitor project.

When I run the following command everything works: ionic cap run ios -l --external --open

But when I try to build (ionic cap build ios --prod) there seem to be a lot of styles missing.

For example: This is a ion-card from when I"m using ‘ionic cap run ios’:

 ![Screenshot 2024-03-05 at 12.29.28](https://global.discourse-cdn.com/ionicframework/original/3X/8/3/833c261f953b894fac7187bb5d538aefdd75e654.png)

But when I build using ‘ionic cap build ios --prod’ I’m seeing the following:

 ![Screenshot 2024-03-05 at 12.31.20](https://global.discourse-cdn.com/ionicframework/original/3X/d/c/dc69f3859340afa459ed26724efe4cb39ebc8ed0.png)

It is the same ion-card, but a lot of classes seem to be missing and the layout breaks. I’m also using Tailwind. I tried to remove Tailwind to see if that was the cause of the dissapearing classes, but that wasn’t the case.

Does anybody have an idea?

---

<div class="post-metadata">

**Author:** ![RickGroenewegen](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rickgroenewegen/32/143221_2.png) [@RickGroenewegen](https://forum.ionicframework.com/u/RickGroenewegen)\
**Post date:** [March 5, 2024, 1:27pm UTC](https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126/2 "2024-03-05T13:27:30Z")

</div>

I was able to solve it by make a change in my ionic.config.json:

{  
“name”: “MyApp”,  
“integrations”: {  
“capacitor”: {}  
},  
“type”: “angular-standalone”  
}

I changed ‘type’ to ‘angular’:

{  
“name”: “MyApp”,  
“integrations”: {  
“capacitor”: {}  
},  
“type”: “angular”  
}

After this my problems were solved

---

<div class="post-metadata">

**Author:** ![julio-ionic](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@julio-ionic](https://forum.ionicframework.com/u/julio-ionic)\
**Post date:** [March 5, 2024, 5:49pm UTC](https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126/3 "2024-03-05T17:49:29Z")

</div>

Is your app an angular app or an angular-standalone app?

If it’s a standalone app and you changed the type it might cause other issues, better report the problem on [Issues · ionic-team/ionic-cli · GitHub](https://github.com/ionic-team/ionic-cli/issues)

---

<div class="post-metadata">

**Author:** ![RickGroenewegen](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rickgroenewegen/32/143221_2.png) [@RickGroenewegen](https://forum.ionicframework.com/u/RickGroenewegen)\
**Post date:** [March 6, 2024, 1:45pm UTC](https://forum.ionicframework.com/t/css-classes-missing-when-building-project/240126/4 "2024-03-06T13:45:17Z")

</div>

You’re right, that caused problems in other screens. My app is indeed standalone, and I discovered the screen that was breaking was importing IonicModule from ‘@ionic/angular’ instead of importing the individual components from ‘@ionic/angular/standalone’, so that was the cause
