Skip to content

trying to understand webc rendering on eleventy #2859

Answered by darthmall
sombriks asked this question in Q&A
Discussion options

You must be logged in to vote

When a component file contains nothing but HTML, WebC will remove the custom element tag and replace it with the HTML in the component file. If a file contains either a <script> or <style> tag, Eleventy leaves in the custom element. You can control this behavior using webc:keep and webc:nokeep.

https://www.11ty.dev/docs/languages/webc/#html-only-components

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sombriks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants