Skip to content

docs(output-target): custom elements auto-define export behavior#916

Merged
rwaskiewicz merged 4 commits intov3.0.0-devfrom
docs/v3-custom-elements-auto-define-export-behavior
Sep 19, 2022
Merged

docs(output-target): custom elements auto-define export behavior#916
rwaskiewicz merged 4 commits intov3.0.0-devfrom
docs/v3-custom-elements-auto-define-export-behavior

Conversation

@tanner-reits
Copy link
Copy Markdown
Contributor

This commit updates autoDefineCustomElements from being a standalone config flag to an option on customElementsExportBehavior

This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`
@vercel
Copy link
Copy Markdown

vercel bot commented Sep 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stencil-site ✅ Ready (Inspect) Visit Preview Sep 19, 2022 at 4:50PM (UTC)

| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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. |
| `auto-define-custom-elements` | A component and its children will be automatically defined with the `CustomElementRegistry` when the component's module is imported. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense for us to order this alphabetically? I'm kind of on the fence here, since "default" is kind of a special value and I don't know if I'd prefer to differentiate it here by having it at the top. I suppose that doesn't prevent us from doing something like

  • default
  • auto-define-custom-elements
  • single-export-module

At the same time, there's really nothing wrong with

  • auto-define-custom-elements
  • default
  • single-export-module

either. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like keeping default at the top, but alphabetizing the others makes sense.

Copy link
Copy Markdown
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry missed this the first time around (and GH won't let me comment inline) - can you update the type definition above the table to include 'auto-define-custom-elements'?

- customElementsExportBehavior: 'default' | 'single-export-module',
+ customElementsExportBehavior: 'default' | 'auto-define-custom-elements' | 'single-export-module',

Copy link
Copy Markdown
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@rwaskiewicz rwaskiewicz merged commit 88dda69 into v3.0.0-dev Sep 19, 2022
@rwaskiewicz rwaskiewicz deleted the docs/v3-custom-elements-auto-define-export-behavior branch September 19, 2022 16:52
rwaskiewicz pushed a commit that referenced this pull request Jan 20, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
rwaskiewicz pushed a commit that referenced this pull request Jan 23, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
This commit updates `autoDefineCustomElements` from being a standalone config flag to an option on `customElementsExportBehavior`. This commit is associated with stenciljs/core#3615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants