Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230101

Selectively define custom elements and their dependencies

$
0
0

Hello!

With a bundle compiled with the dist-custom-elements-bundle output target, it is possible to import components as a module.
We can then either define all custom elements with the defineCustomElements helper, which is not ideal in term of bundle size, or define them one by one.
It’s all very well explained here: Bundling Custom Elements with Stencil - Stencil.

When a component has dependencies, it also necessary to explicitly define them all.
In the context of a public design system, it may not be a very intuitive usage. It means being aware of the component’s dependencies and manually define them all. For very complex components, it can be very cumbersome.

Would there be away to automatically detect the dependencies and consequently define all needed custom Elements?
The ideal usage would then look like something like this:

defineCustomElement('my-component')

Thanks for the help!


Viewing all articles
Browse latest Browse all 230101

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>