Skip to content

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

@rothsandro

Description

@rothsandro

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

Metadata

Metadata

Assignees

Labels

feature: ⏱️ watchDoesn’t affect primary builds, only subsequent builds during --watch and --servewaiting-to-closeIssue that is probably resolved, waiting on OP confirmation.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions