-
Notifications
You must be signed in to change notification settings - Fork 422
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
feat(output-targets): add section for customElementsExportBehavior
#909
feat(output-targets): add section for customElementsExportBehavior
#909
Conversation
This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This commit updates the docs for `dist-custom-elements` to reflect the renamed values for `CustomElementsExportBehavior`
This commit updates the docs for the `customElementsExportBehavior` config option to reflect the changes to use a type instead of an enum.
| Option | Description | | ||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `default` | No additional re-export or auto-definition behavior will be performed.<br><br>This value will be used if no explicit value is set in the config, or if a given value is not a valid option. | | ||
| `single-export-module` | All component and custom element definition helper functions will be exported from the `index.js` file in the output directory (see [Defining Exported Custom Elements](#defining-exported-custom-elements) for more information on this file's purpose). This file can be used as the root module when distributing your component library, see [below](#distributing-custom-elements) for more details. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a comment about treeshaking here and that it won't always be possible to fully treeshake with this option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should always be possible once autoDefineCustomElements
is migrated to be one of these options and not its own flag. I could add a comment for now with a "todo" to remove it later, but all that should happen before the v3 release anyway 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just had one question
defined. This is a known limitation of the API and users should be aware of | ||
it | ||
> defined. This is a known limitation of the API and users should be aware of | ||
> it | ||
|
||
### generateTypeDeclarations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have a note here about how this option's behavior is affected by the setting for customElementsExportBehavior
? I think it wouldn't need to be anything more complicated than "When set to generate type declarations, Stencil respects the export behavior selected via customElementsExportBehavior
and generates type declarations specific to the content of that file" or something along those lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that 👍
This commit adds a not to the `generateTypeDeclarations` section of the `dist-custom-elements` doc notifying users that the types generated will align with the selected `customElementsExportBehavior`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
…909) This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
This commit modifies the docs for
dist-custom-elements
to add documentation for thecustomElementsExportBehavior
config option