Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: [v7.8.1] angular standalone do not load correctly ionic componentes in production build #29226

Closed
3 tasks done
GusLAN opened this issue Mar 27, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels

Comments

@GusLAN
Copy link

GusLAN commented Mar 27, 2024

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

While refactoring an Ionic application for version 7.8.1, using standalone Angular components, an issue surfaced regarding the functionality of Ioinic Components in production builds.

It was observed that these components fail to function as intended during production builds. While a temporary workaround involves setting the "buildOptimization" property to false within the angular.json file, this solution is deemed unsatisfactory.

Example modification in angular.json:

{
   "projects": {
     "app": {
       "architect": {
         "build": {
           "configurations": {
             "production": {
               "buildOptimization": false,
               ...
             }
             ...
           }
           ...
         }
         ...
       }
       ...
     }
     ...
   }
   ...
}

Another solution we have found is to create a service to define all the ionic elements, but it does not seem like a suitable solution to us either.

imagen

Expected Behavior

The Ionic components ought to render accurately when integrated with standalone Angular components during production builds.

Steps to Reproduce

Complie app with:

$ ionic serve --configuration=production

Code Reproduction URL

.

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 7.8.1
@angular-devkit/build-angular : 16.2.2
@angular-devkit/schematics : 16.2.2
@angular/cli : 16.2.2
@ionic/angular-toolkit : not installed

Cordova:

Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Cordova Platforms : android 12.0.1, ios 7.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 23 other plugins)

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

Android SDK Tools : 26.1.1
ios-deploy : 1.12.2
ios-sim : 8.0.2
NodeJS : v18.19.
npm : 10.3.0
OS : macOS Unknown
Xcode : Xcode 15.3 Build version 15E204a

Additional Information

No response

@jomarti
Copy link

jomarti commented Mar 27, 2024

Same problem in my proyect, when use a library external with ionic components.

@liamdebeasi
Copy link
Contributor

Thanks for the issue! This issue is being closed due to the lack of a code reproduction. As noted in the issue template, reproduction URLs are required for the team to effectively triage issues. 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.

Thank you for using Ionic!

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
Copy link

ionitron-bot bot commented Apr 26, 2024

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants