Salesforce Fact #937 | Dynamic import of LWC

With the Winter'24 release, we can use dynamic import for LWC components.

Few things to keep a check:

1) The api version of the LWC should be >= 55.0

2) Lightning Web Security must be enabled in session settings.

3) The XML config file should use the lightning__dynamicComponent capability.

However, we need to consider the performance overhead while using dynamic import and should use it selectively.

Attached are the screenshots of an example.

Reference: https://developer.salesforce.com/docs/platform/lwc/guide/js-dynamic-components.html





Comments

Popular posts from this blog