Closed d3v1an7 closed 1 year ago
I'm having a similar issue, but worse: I can't get my page templates to update when directly embedded webc components change, either!
Whenever I change a webc component, I have to restart the server in order to see the change in the browser, regardless of whether the webc component is embedded in a page template, a layout, or another webc component. I'm trying to implement the whole site using only webc and markdown, so there are no other templating languages involved.
I'm loading my components with the following configuration in my eleventy.config.js file:
eleventyConfig.addPlugin(pluginWebC, {
components: 'source/_includes/components/**/*.webc'
});
Using eleventy-plugin-webc v0.10.1.
Thanks!
Yep, this issue seems to have been related to webc components in layout files! A bugfix for this will be shipped with 2.0.2. Check out this related issue in the eleventy repo: https://github.com/11ty/eleventy/issues/2903
Duplicate of https://github.com/11ty/eleventy/issues/2903
thanks!
/_includes/home.webc
/_components/site-header.webc
/index.webc
✅ Making changes to
index.webc
will immediately show change in browser ❌ Making changes to/_includes/home.webc
will NOT show change in browser, and seeing the change requires server restart ❌ Making changes to/_components/site-header.webc
will NOT show change in browser, and seeing the change requires server restartIt seems to possibly be an issue just with
layout
, because if I move the<site-header></site-header>
directly into/index.webc
, changes to the component will immediately show in browser again.Using
@11ty/eleventy-plugin-webc 0.10.0