Skip to content

[4.0.0-rc.1]Slides do not work in production build #17032

Closed

Description

@toriphes

Bug Report

This problem seems to be related to the angular build optimizer.

Ionic version:
[x] 4.0.0-rc.1

Current behavior:
When serving the app with the command ionic serve --prod ion-slides show only the first of N° slides and the browser get an error in the console:

schermata 2019-01-10 alle 09 36 07

Expected behavior:
Shows all the slides without errors in the console

Steps to reproduce:
Serve the template code below with --prod flag

Related code:

<ion-header>
  <ion-toolbar>
    <ion-title>Slider</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>

  <ion-slides pager="true">
    <ion-slide>slide 1</ion-slide>
    <ion-slide>slide 2</ion-slide>
  </ion-slides>

</ion-content>

Other information:
Setting buildOptimizer: false In the angular.json file solves the problem but this is a silly workaround.

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.7.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.1
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Activity

  1. paulstelzer commented on Jan 10, 2019

    @paulstelzer
    Contributor

    RC.1 isn't working in produciton mode, I can confirm and collect everything under one issue -> #17034

  2. ionitron-bot commented on Feb 9, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  3. locked and limited conversation to collaborators on Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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