ngneat / svg-icon

👻 A lightweight library that makes it easier to use SVG icons in your Angular Application
https://netbasal.com
MIT License
257 stars 35 forks source link

Don't see icons, when run with aot: true (or build --prod --aot="true") #49

Closed denysSlobodianykAVA closed 2 years ago

denysSlobodianykAVA commented 3 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Support request

Current behavior

No icons inside in production build

Expected behavior

Icons exist inside in production build

Minimal reproduction of the problem with instructions

Tried to reproduce the code in stackblitz. But here somehow it works ( https://stackblitz.com/edit/angular-ivy-d2mmak?file=src%2Fapp%2Fapp.component.html

What is the motivation / use case for changing the behavior?

Fix issues with build.

Environment


Angular version: 8.2.14

Browser:
- [ ] Chrome (desktop) version 91.0.4472.77 (Official Build) (arm64)
 - [] Firefox 88.0.1 (64-bit)

For Tooling issues:
- Node version: v14.16.0
- Platform:  Mac, M1

Others:
"@angular/animations": "~8.2.14",
    "@angular/common": "~8.2.14",
    "@angular/compiler": "~8.2.14",
    "@angular/core": "~8.2.14",
    "@angular/forms": "~8.2.14",
    "@angular/platform-browser": "~8.2.14",
    "@angular/platform-browser-dynamic": "~8.2.14",
    "@angular/router": "~8.2.14",
NetanelBasal commented 2 years ago

It works fine for me. If you still have an issue, feel free to reopen it.

denysSlobodianykAVA commented 2 years ago

@NetanelBasal hi, yes it still doesn't work for me (in - - prod build) . Smth went strange. Can it be, because of Angular 8 and not using Ivy?

NetanelBasal commented 2 years ago

Sounds weird. Why you're still on v8?

denysSlobodianykAVA commented 2 years ago

Yea, I know). I am using 'set' on ContentChildren <Directive>, and it does not work fine on Angular 9, if I am changing count of templates with this directive in runtime. That is why). But someday soon I will update ng and hope not have issue with icons