11ty / eleventy-plugin-webc

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

Build process on `--serve` not triggered for `.webc` files #72

Open lucaorio opened 1 year ago

lucaorio commented 1 year ago

Hello! 👋 I am running Eleventy 2.0.1.

As shown in the log below, it looks like by running --serve the dev server is watching and picking up the updates and triggering a reload, but the build process writes the file without changes.

[11ty] Watching…
[11ty] File changed: src/components/navigation.webc
[11ty] Writing dist/index.html from ./src/index.webc
[11ty] Copied 6 files / Wrote 1 file in 0.02 seconds (v2.0.1)

Restarting the dev server triggers the build correctly, but the changes made after that are still not reflected in the subsequent builds!

zachleat commented 1 year ago

I think there are a few scenarios in which this is still a problem. I’m going to move it over to the eleventy-plugin-webc repo to keep these in the same spot

trafnar commented 1 year ago

I'm also struggling with this problem, I'm currently manually killing and restarting my dev server every time I change a webc component. Would love to know of any workarounds.

mirisuzanne commented 9 months ago

I'm also running into this issue.

awmottaz commented 9 months ago

Same here — @zachleat can we reopen this issue?

edmelly commented 6 months ago

Would be great if this issue could be looked at again. I’d hoped upgrading to 11ty v3 alpha might (somehow) fix the problem; it is still present though, and hard to pin down.

A simple setup with .webc includes initially works fine, with updates reflected in the browser quickly. As soon as you start to add subfolders, or try to use .webc for page/layouts/includes, changes are no longer reflected despite the build triggering. It’s a huge hit to productivity having to stop and start the server.

RenegadeScooter commented 5 months ago

I just tested today (but not before running npm up to be sure). This bug is still present, over a year after this issue was created. What gives?

patrick-schneider-latori commented 5 months ago

I investigated that it mostly does not reflect changes if you include webc components inside of webc components. But if you also save the root webc component, which is mostly the layout webc file in which updated webc files are included, it updates everything correctly. Maybe this hint helps to fix it. I would also welcome that watch changes are reflected in ANY webc file throughout the whole build.