Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

ion-tab template bindings are empty when using --prod to build #1229

@kemety

Description

@kemety

Short description of the problem:

I have an App created with Ionic 2.2.1 and I only upgraded the CLI to the latest 3.10.3. I use custom icons from png files for the ion-tab menu.
When I compile the App with --prod the icons in the ion-tab navigation bar disappear.
I inspected the App in chrome and something very strange is happening, if I run on the simulator with --debug, the icons appear and I see in Chrome that the icons are being loaded and it refers to main.js calling them.
When I run on the simulator with --prod, the icons disappear and I do not see them loading at all in chrome.
I also compiled the app with --prod and installed the apk on a real phone and the icons did not show.

Building with CLI 2.2.1 works normally even with --prod and the icons show.

What behavior are you expecting?

I expect that the custom icons appear normally when I use --prod

Steps to reproduce:

  1. run ionic cordova run android --simulator --prod
    App loads without menu icons.
  2. run ionic cordova run android --simulator
    Icons appear normally.
  3. The code used for the menu in file src/theme/common/overrides.scss
$tab-items: ('item1', 'item2', 'item3', 'item4', 'item5');
ion-icon {
  min-height: 2rem;
  @each $icon in $tab-items {
    &[ng-reflect-name="#{$icon}"] {
      background-image: url(../assets/images/tabs/#{$icon}.png);
      background-repeat: no-repeat;
      background-position: 50% 50%;
      background-size: contain;
      &[ng-reflect-is-active="true"] {
        background-image: url(../assets/images/tabs/#{$icon}-active.png);
      }
    }
  }
}

Which @ionic/app-scripts version are you using?
1.1.4

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions