-
Notifications
You must be signed in to change notification settings - Fork 22
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
IdsMessage: ids-modal-button not working when build in production #1571
Comments
I tried to remove the buildOptimizer in Angular build config, and it works. |
@kellyFeng1 so this can be closed/nothing to investigate? |
@tmcconechy the buildOptimizer=true is a default setting in Angular building and can shrink Angular bundles. We can remove this optimizer temporarily to make it work, but I believe it is still a bug. |
I can confirm that we can reproduce this in our Angular WC examples project if you run There are some additional problems as well. For example, neither Modal Button works in that example, and if you click out of the message to close, and re-open the message, the overlay is missing. Building for I've been digging into this and I've come across quite a bit of correspondence in the Angular Github repos related to
Some other related threads:
The gist of it is, the buildOptimizer feature introduces an Uglify.js/Terser flag that causes modifications to bundled third party code that cannot be opted-out (see anything referring to the pure_getters setting). Per angular/angular-cli#15761, seems like they are finally moving on a way to bypass just those settings while keeping the optimizer enabled, but currently there are no ways around it. I'm still trying to learn what we could do on the WC/Angular side to fix this aside from turning off
|
@EdwardCoyle i saw NG 17 which we are on now in that example project uses a new build system in esbuild (which we use on our repo too). Maybe you can see if the new build method works https://angular.io/guide/esbuild |
Update on this: I've been stuck on an issue that I think may be a bug with the new ESBuild system. Currently waiting for feedback on angular/angular-cli#26665 for more information |
@kellyFeng1 We've done some testing on a production configuration of our Angular examples repo against Angular 17 and the new Considering this is Angular's recommendation for new applications going forward, it may be better than reworking all our components against the |
@kellyFeng1 given that the new build method in angular solves it, this may be the best we can do for you. I also recommend the new control flow syntax in angular 17 https://www.angularaddicts.com/p/angular-17-new-control-flow-with-signals Will mark this resolved for now with that solution |
Describe the bug
the ids-modal-button
To Reproduce
html:
ts:
When building in dev mode, clicking 'çancel' button will close the message. But if using ng serve --configuration production for building, the cancel button doesn't work.
Version
"ids-enterprise-wc": "^1.0.0-beta.16"
Platform
The text was updated successfully, but these errors were encountered: