You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate an auto-loader script for dist-custom-elements that uses MutationObserver to lazily load and define custom elements as they appear in the DOM.
@theo-staizen - apologies - I never got 'round to doing this 😅 (been busy looking at v5 dev)!
what's the difference between that and customElementsExportBehavior: 'auto-define-custom-elements'?
auto-define-custom-elements will mean that when you import a component - import 'components/my-component.js' - it will auto define itself and additionally auto import and define any dependent children.
autoloader is an alternative to dist; It outputs an loader.js in the root of your custom-elements dir - add that as a <script> tag and it adds a MutationObserver which detects DOM changes and imports / defines components as they're used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?
GitHub Issue Number: N/A
What is the new behavior?
Generate an auto-loader script for
dist-custom-elementsthat uses MutationObserver to lazily load and define custom elements as they appear in the DOM.Documentation
TODO
Does this introduce a breaking change?
Testing
Spec and wdio
Other information