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

Passthrough copy and --incremental results in incorrect directory structure #3285

Open
jsahlen opened this issue May 17, 2024 · 0 comments
Open

Comments

@jsahlen
Copy link

jsahlen commented May 17, 2024

Operating system

macOS Sonoma 14.4.1

Eleventy

2.0.1 and 3.0.0-alpha.10

Describe the bug

When using addPassthroughCopy() with a custom destination directory, files nested within the source directory will be copied correctly on the initial run of Eleventy in watch or serve mode, with the --incremental flag. But when one of those nested files are changed in the source directory, it is copied to the root destination directory, without preserving the directory structure.

Old, related issue: #2297

Reproduction steps

Using the reproduction repo referenced below, when first starting the --watch or --serve command with the --incremental flag, files are copied as expected:

dist
├── index.html
└── scripts
    ├── lib
    │   └── hello-world.js
    └── main.js

However, if I modify src/scripts/lib/hello-world.js, it will be written straight to the destination directory, so it will look like this:

dist
├── index.html
└── scripts
    ├── hello-world.js
    ├── lib
    │   └── hello-world.js
    └── main.js

Expected behavior

I would expect modification of src/scripts/lib/hello-world.js to copy the file with its directory structure retained, to dist/scripts/lib/hello-world.js.

Reproduction URL

https://github.com/jsahlen/eleventy-passthrough-incremental

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant