I have some web components custom elements, in this case built with StencilJS. They are installed into my solution via an npm package and then included globally in a layout via a script tag.
How can I get Visual Studio to know about these elements and provide intellisense for custom elements + their attributes in .cshtml views?
StencilJS outputs a TypeScript *.d.ts file containing definitions for these elements, as well as additional JSON files describing the elements. Can Visual Studio use either of these?
It seems as though Visual Studio Code can be configured to consume this JSON by adding a reference in the html.customData
setting, does Visual Studio have something equivalent?
I think the comment from @Thomas is correct and this is not currently possible:
Looks like it's not possible: github.com/dotnet/aspnetcore/issues/27054 – Thomas
I have raised a suggestion here:
https://developercommunity.visualstudio.com/idea/1244541/intellisense-for-custom-web-components.html?childToView=1245502
edit: marked as duplicate, use this link:
https://developercommunity2.visualstudio.com/t/Visual-Studio-WebComponents-Intellisense/1227195?preview=true
If this is something you'd like to see in Visual Studio, head over and give it a vote so it gets some visibility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With