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.
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.
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 🤷♂️
alicewriteswrongs
left a comment
There was a problem hiding this comment.
just had one question
| > defined. This is a known limitation of the API and users should be aware of | ||
| > it | ||
|
|
||
| ### generateTypeDeclarations |
There was a problem hiding this comment.
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
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`
…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-elementsto add documentation for thecustomElementsExportBehaviorconfig option