-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
Files in addPassthroughCopy with glob not ignored with .eleventyignore #1134
Comments
Same issue as #1252 ? |
I ran into the same problem and originally posted this as a duplicate issue. I closed that issue and am pasting my comments and notes here. Describe the bug To Reproduce
Site is also set up to copy jpg, png, gif, mp4, and pdf. My .eleventyignore file looks like this:
When I run Eleventy, I end up with a node_modules folder inside my output folder (_site). If I run Eleventy again, my _site folder has another _site folder nested inside it. Subsequent runs also throw multiple errors for TemplatePassthroughError, TempateWriterWriteError, TemplatePassthroughManagerCopyError, and Error ENOENT no such file or directory. The .eleventyignore file does not seem to be working. Expected behavior Environment:
Additional context
But I have css, js and image files located in several different subfolders. I did not want to have to keep "whitelisting" every file that needed to be passed through. Therefore the glob method made more sense, even though it's slower. |
as workaround i propose patch #1686 where we allow to pass options to recursive-copy ventyConfig.addPassthroughCopy("node_modules/@fontsource/noto-sans", { expand: true });
eleventyConfig.addPassthroughCopy({
'posts/**': 'blog',
}, {
filter: path => (path.slice(-3) != '.md')
}); |
Stumbled over this yet again. The only way I was able to make this work was to use |
I found this to be a problem/annoyance as well. It doesn't block development, but creates noise in the console and a messy output folder. My workaround was to use a glob pattern like this: An important difference between my project and the example is that I am not using an I am calling out References: |
Sorry for the super-late reply here, going through some ignores logic today and realizing we are missing some clarity. Here’s how it works now (warts and all):
I think changing the default to add ignore support into All of that said, maybe another opt-in (instead of changing the default) for this is warranted given the confusion here! |
Also #2461 |
Excellent counterpoint (“why is |
Describe the bug
I have a call to
addPassthroughCopy
with a glob to take all images, but one folder is in my.eleventyignore
file and the images inside it are copied.To Reproduce
Reduced test case:
Also in one single command:
The file
src/ignored/file.txt
is copied even ifsrc/ignored
is in.eleventyignore
:$ tree . ├── _site │ └── ignored │ └── file.txt └── src └── ignored └── file.txt 4 directories, 2 files
Expected behavior
I thought (I would like to)
addPassthroughCopy
respected.eleventyignore
.Environment:
The text was updated successfully, but these errors were encountered: