Skip to content

Commit ba5b725

Browse files
authored
Build: Fix watching of copied resources (#4237)
This addresses issues where resources being passthrough-copied (or otherwise copied by us in `eleventy.after`) would not update at all without a full server restart. This update does not change build output.
1 parent 9ceac4a commit ba5b725

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eleventy.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,6 @@ export default function (eleventyConfig: any) {
231231
isUnderstanding ? flatGuidelines[resolveUnderstandingFileSlug(page.fileSlug)] : null,
232232
});
233233

234-
// See https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
235-
eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
236-
237234
eleventyConfig.addPassthroughCopy("techniques/*.css");
238235
eleventyConfig.addPassthroughCopy("techniques/*/img/*");
239236
eleventyConfig.addPassthroughCopy({
@@ -249,6 +246,9 @@ export default function (eleventyConfig: any) {
249246
});
250247

251248
eleventyConfig.addPassthroughCopy("working-examples/**");
249+
// working-examples is in .eleventyignore to avoid processing as templates,
250+
// but should still be included as a watch target to pick up changes in dev
251+
eleventyConfig.watchIgnores.add("!working-examples/**");
252252

253253
eleventyConfig.on("eleventy.before", async ({ runMode }: EleventyEvent) => {
254254
// Clear the _site folder before builds intended for the W3C site,

0 commit comments

Comments
 (0)