CSS broken when emulating iOS


Hello - When emulating my app there’s no CSS that appears, though it looks just fine in the browser via “ionic serve”.

Looking into the folder platforms/ios/www/css/ all the css files:

  • ionic.app.css
  • ionic.app.min.css
  • style.css

Only have “[object Object]” inside of them and none of the CSS I wrote. I’ve tried removing, adding back, building, then emulating ios via both Ionic and Cordova with no luck.

The only thing that works is linking to directly to the CSS hosted elsewhere like:

<link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">

In www/lib/ionic/css everything looks fine. Any thoughts on how to ensure my CSS shows up when emulating would be much appreciated!


Much time has passed, but i’ll leave this here if anybody gets this, as I did.

At first I solved it by removing the custom uglifying hook i added.
Then I traced it down to CleanCSS.minify returning an object instead of a string, as it apparently did before.
I had to change

result = cssMinifier.minify(source);
fs.writeFileSync(file, result, 'utf8');


result = cssMinifier.minify(source);
fs.writeFileSync(file, result.styles, 'utf8');

It then worked nicely again.