Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler): default asyncLoading build conditional to true #5941

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

tanner-reits
Copy link
Contributor

What is the current behavior?

Currently, the dist-custom-elements build does not respect the behavior of certain lifecycle methods executing for child components, prior to parent components (as mentioned in the Stencil documentation).

Fixes: #3580

What is the new behavior?

This commit updates the default behavior for BUILD.asyncLoading to true. This change is necessary because the custom elements build does not customize the build conditionals like the lazy build. So, this value was never being set to true even in applicable scenarios.

This does have a slight impact on treeshaking (since any if statement testing this condition will now always be true) and runtime performance.

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

Tested in the reproduction case from #3580 and added a e2e test to ensure the methods are called in the appropriate order.

Other information

Sorry, something went wrong.

Fixes: #3580

STENCIL-565
@tanner-reits tanner-reits marked this pull request as ready for review August 14, 2024 13:46
@tanner-reits tanner-reits requested a review from a team as a code owner August 14, 2024 13:46
@tanner-reits tanner-reits added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit 0e261d6 Aug 15, 2024
88 checks passed
@tanner-reits tanner-reits deleted the tr/custom-elements-lifecycle-hierarchy branch August 15, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: componentDidLoad is called in parent before children have loaded
2 participants