eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

File content not updating in watch mode if input directory is set to parent folder

Open rothsandro opened this issue 4 months ago • 1 comments

Operating system

macOS Sonoma 14.2.1

Eleventy

3.1.2

Describe the bug

I configured Eleventy to use the parent folder as input directory:

eleventyConfig.setInputDirectory("./../");

When I run eleventy --watch and then edit an existing Markdown file, Eleventy properly detects the change (File changed './index.md') and writes it to the output file (Writing ./_site/index.html), but the content of the output file is not updated, the changes are not reflected.

If I manually delete the output file and save the Markdown file again, the file is re-created with the old content.

The directory structure:

.
├── app/
│   └── .eleventy.js
└── index.md  <-- File to modify

It worked fine in v3.1.1 but is broken in v3.1.2

Reproduction steps

  1. Clone the repository
  2. Navigate into the app subfolder
  3. Install dependencies npm install
  4. Run npx eleventy --watch
  5. Modify index.md in the root of the project
  6. Check the output in app/_site/index.html

Expected behavior

The output file should be updated with the latest content.

Reproduction URL

https://github.com/rothsandro/repro.11ty-watch

Screenshots

No response

rothsandro avatar Aug 04 '25 16:08 rothsandro

This is fixed in the 4.0 canaries, looks like in v4.0.0-alpha.4 (v4.0.0-alpha.3 still shows the broken behavior)

So that means #3914 fixed it, via https://github.com/11ty/eleventy/compare/v4.0.0-alpha.3...v4.0.0-alpha.4

zachleat avatar Oct 29 '25 22:10 zachleat