-
Notifications
You must be signed in to change notification settings - Fork 519
Angular AOT error when having a component within a library #1168
Comments
It sounds like the third-party package you're using wasn't built in a way that's compatible with AoT. I don't think they should have included the If you want to pursue getting a fix for this, can you report it to the package author? |
@SteveSandersonMS well the thing is the libraries I'm using one is Angular Material the official, so I doubt it's not built correctly with AOT and the other as I stated it's my library, and I just checked both and they don't have Just to let you know we have been investigating this around 2 days already, wasn't too hasty to open the issue. |
OK, thanks for the update. It's entirely possible there's some limitation in If you do manage to track this down and believe there's a bug in the code in this repo, could you please let us know the details? Thanks! |
@SteveSandersonMS sure if I have any findings regarding this I will reply to this one; as its quite a headache and it's crucial, thanks. |
Just a slight update, I created a repo with a fresh https://github.com/stephenlautier/aot-comp-error If anyone wants to give it a go:
|
Thanks for posting the repro info. I think the problem is on this line in
The The fix is therefore trivial: just remove I will look at making this the default in the template. Unfortunately it's too late for this change to be included in the .NET Core 2.0 SDK so people will have to discover for themselves the need to remove this in certain AoT scenarios, depending on what third-party packages they use. |
@SteveSandersonMS thank you soooo much! Being not too familiar with webpack didn't help, at least it wasn't just my issue. Thanks again. |
removed 'include: /ClientApp/' from ts rule per aspnet/JavaScriptServices#1168
The fix is now in the |
I had the same issue with angular2-markdown package, removing |
I changed my wepack.config.js to |
…g according to issue aspnet/JavaScriptServices#1168. Redraw distribution chart when deleting a measurement.
…h angular-tree-component aspnet/JavaScriptServices#1168
Hi,
Not sure if this an issue, or requires some changes within webpack in order to get it work, perhaps someone else already seen this issue as it should be quite common I would say.
When adding a library such as Angular Material, or even I created a simple component within a library to narrow this down, and building the app as AoT, we get the following error:
The following is a simple component which doesn't work
These are the conditions when it doesn't work.
The text was updated successfully, but these errors were encountered: