Live-reload functionality in Salesforce LocalDev does not refresh child components when the main component published to an Experience Website uses dynamic imports. Specifically, if a component is dynamically imported (e.g., import('c/dynamicComponent')), any changes made to the dynamically imported child component (or any other non-dynamically imported child component) are not recompiled or published as expected during live-reload.
Steps To Reproduce:
Set up a main component (WebsiteMain) that dynamically imports child components using import('c/childComponent').
Publish the main component to an Experience Website and initiate live reload using the command:
sf lightning dev site --target-org dev --name "MyWebsite"
Make a change to the dynamically imported child component, or any other child component (e.g., childComponent).
Observe that live reload does not pick up changes made to any child component.
Expected Result
When a change is made to any child component and the parent utilizes a dynamically imported component, live-reload should refresh and apply the changes across all relevant components, including any dynamically imported child components.
Actual Result
Live-reload does not detect or apply changes made to any child components other than the main component that utilizes the main site. All child components (even those that are not dynamically imported) appear to remain unaffected by these changes during live-reload.
Additional Information
Code Sample
Here’s an example of the WebsiteMain component, illustrating the dynamic import setup:
Summary
Live-reload functionality in Salesforce LocalDev does not refresh child components when the main component published to an Experience Website uses dynamic imports. Specifically, if a component is dynamically imported (e.g.,
import('c/dynamicComponent')
), any changes made to the dynamically imported child component (or any other non-dynamically imported child component) are not recompiled or published as expected during live-reload.Steps To Reproduce:
Set up a main component (WebsiteMain) that dynamically imports child components using
import('c/childComponent')
.Publish the main component to an Experience Website and initiate live reload using the command:
sf lightning dev site --target-org dev --name "MyWebsite"
Make a change to the dynamically imported child component, or any other child component (e.g., childComponent).
Observe that live reload does not pick up changes made to any child component.
Expected Result
When a change is made to any child component and the parent utilizes a dynamically imported component, live-reload should refresh and apply the changes across all relevant components, including any dynamically imported child components.
Actual Result
Live-reload does not detect or apply changes made to any child components other than the main component that utilizes the main site. All child components (even those that are not dynamically imported) appear to remain unaffected by these changes during live-reload.
Additional Information
Code Sample Here’s an example of the WebsiteMain component, illustrating the dynamic import setup:
Screenshots:
None
Logs:
No logs are created (even when
DEBUG=*
is set) when modifying a child component with dynamic imports utilized.System Information
SF CLI:
OS:
Experience Sites Only: