-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compiler): add
defineCustomElements
method & signature typedef (…
…#3619) * feat(compiler): moves `autoDefineCustomElements` to an export behavior This commit moves `autoDefineCustomElements` from a config flag to a `customElementsExportBehavior` option on the `dist-custom-elements` output target. This prevents treeshaking issues that were possible when barrel exporting and this option were both enabled. * feat(compiler): add `defineCustomElements` method & signature typedef This commit adds a `defineCustomElements` function to the `dist-custom-elements` output target that can be used to define all custom elements at once. TBD on if this will always be available, for certain export behaviors, or as a dedicated export behavior * feat(compiler): add export behavior for custom elements `defineCustomElements` This commit wraps the `defineCustomElements()` function for `dist-custom-elements` into a new export behavior so this becomes opt-in behavior rather than behavior that always exists * test(compiler): tests for custom elements `bundle` export behavior This commit adds test cases for the new `bundle` export behavior on `dist-custom-elements` that will serve as a quick port-over for projects currently using `dist-custom-elements-bundle` * misc(): fix jest alias lint error * fix(): PR feedback * refactor(compiler): move export behavior conditionals to entry point generation This commit moves the logic for `dist-custom-elements` export behavior to the `generateEntryPoint()` function. This keeps all the logic responsible for generating entry-point code in the same place and will make it easier to add/remove export behaviors in the future * misc(compiler): add line break before body content in custom element output * fix(): failing tests due to code format output change
- Loading branch information
1 parent
e52489e
commit 7521e17
Showing
5 changed files
with
228 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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