CSS image with relative path not working when build with --prod flag


#1

Hi,

when i build my app without the flag --prod or when i test with ionic serve in the browser, the css images are displayed correctly, but when i build for production the images are not displayed. There’s my css:

/*src/pages/app-index/app-index.scss*/
.tab-button-icon[ng-reflect-is-active=false][ng-reflect-name="frequencyicon"] {
  content: url("../assets/img/tabs/iconTabbarLfInactive@2x.png");
}

Does anyone have an idea to fix it?


#2

Are the files missing?
Is the generated css different?


#3

The css is generated correctly in follow file:
/platforms/android/assets/www/build/main.css

.tab-button-icon[ng-reflect-is-active=false][ng-reflect-name=frequencyicon]{content:url(../assets/img/tabs/iconTabbarLfInactive@2x.png)}

The image is generated correctly in follow path:
/platforms/android/assets/www/assets/img/tabs/iconTabbarLfInactive@2x.png