fix(compiler): default asyncLoading
build conditional to true
#5941
+78
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
totrue
. 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 totrue
even in applicable scenarios.This does have a slight impact on treeshaking (since any
if
statement testing this condition will now always betrue
) and runtime performance.Documentation
N/A
Does this introduce a breaking change?
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