Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lucaorio opened this issue Apr 5, 2023 · 7 comments
Open

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

lucaorio opened this issue Apr 5, 2023 · 7 comments

Comments

@lucaorio
Copy link

lucaorio commented Apr 5, 2023

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!

@lucaorio lucaorio closed this as completed Apr 7, 2023
@zachleat
Copy link
Member

zachleat commented Apr 7, 2023

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

@zachleat zachleat transferred this issue from 11ty/eleventy Apr 7, 2023
@trafnar
Copy link

trafnar commented Jul 14, 2023

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
Copy link

I'm also running into this issue.

@awmottaz
Copy link

Same here — @zachleat can we reopen this issue?

@edmelly
Copy link

edmelly commented Apr 6, 2024

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
Copy link

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?

@zachleat zachleat reopened this May 4, 2024
@patrick-schneider-latori
Copy link

patrick-schneider-latori commented May 26, 2024

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.

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

No branches or pull requests

8 participants