11ty / eleventy-plugin-webc

Adds support for WebC *.webc files to Eleventy
https://www.11ty.dev/docs/languages/webc/
119 stars 10 forks source link

Explain why WebC may fail w/o `useTransform: true` #73

Open Zearin opened 1 year ago

Zearin commented 1 year ago

I am trying WebC for the first time.

I’m trying it out in a project that uses Pug, if that matters. I’m not converting all Pug templates—just a few small components for the benefits of co-locating all relevant code in a single file.

The plugin works, but only if I use:

eleventyConfig.addPlugin(pluginWebc, {
        useTransform: true
})

Can you update the docs with an explanation of which circumstances may require using this option?

solution-loisir commented 1 year ago

It looks like when this option si enabled, HTML output will be post-processed as WebC. I don't know Pug enough to tell the relationship. https://www.11ty.dev/docs/languages/webc/#post-process-html-output-as-webc