In 0.7.1, I had my system configured to passthrough copy several static files (e.g. a favicon.ico) as well as a compiled asset directory (named _, in my root directory next to _site).
I have gulp running to watch and recompile files as they're changed. Prior to upgrading to 0.8.1, when they changed on disk Eleventy would notice and copy them again, prompting a browsersync reload. After upgrading to 0.8.1, I need to kill and restart the Eleventy server to have it copy the assets over again.
Here are the relevant configuration files - pretty much any Typescript or SCSS file will do the trick, I think.
Though admittedly I may have introduced an error in my upgrade to 0.8.1, as I was moving to use new features and shorten my configuration files.
I am experiencing the same problem. Although I have a similar setup. Editing the file directly that has PassthroughCopy results in no changes. I've tried on two projects with both 0.7.1 and 0.8.1 used on each.
As an update: Tracing through some code, I discovered that updates to files in .gitignore are ignored by the watcher. Adding config.setUseGitIgnore(false) to my config file resolves this, though the regression here surprises me.
(For research purposes, this feature was added in #83.)
For the most part, any files listed in either .gitignore or .eleventyignore are opted out of Eleventy features altogether. https://www.11ty.io/docs/ignores/ As you note, some of this functionality can be modified using the setUseGitIgnore method.
Unfortunately I don鈥檛 believe this was a regression (semantically speaking), I believe this was a bug fix and you were relying on the incorrect behavior. https://github.com/11ty/eleventy/issues/403#issuecomment-470672667
Can you provide more detail about how you are using .gitignore here with your Eleventy project? Why are your images opted out of version control? I鈥檓 open to making changes that make sense here.
This makes sense regarding not using anything under .gitignore. I personally use Tailwind which generates large amounts of intermediate CSS which is then later purged to be used for the final build.
All source files are version controlled but files generated from source during build/development phase are not.
Would the ideal way be to opt-out of .gitignore and have .eleventyignore as a carbon copy of .gitignore minus files required to be handled by Eleventy?
I have a build step for my JS and CSS, to use both Typescript and SCSS + Tailwind.
I would like to rely on Eleventy's built-in Browsersync for hot reloading of assets, so I have to use addPassthroughCopy. Doing so ensures that they are watched and copied through on changes, which then triggers a hot reload. Building them into _site doesn't (or didn't with my configuration under 0.7.1) trigger a hot reload, though I could refresh manually to get updates.
I don't want to keep build artifacts in my version control system, so I have the _ directory (the JS/CSS build directory) in my .gitignore. I'm suppose I'm more surprised that explicitly adding a passthrough copy directory with the function results in it still being ignored, though I can see how following it strictly can also make sense here.
An alternative would be to watch the _site directory for changes, which would allow me to build directly into the Eleventy build directory and skip the intermediate step.
FWIW I've been keeping some files in _includes even if I'm not include-ing them from template files. This gets me a free watch on those files when running eleventy --serve|--watch.
EDIT: This has been especially useful for my Tailwind .css files that include stuff like @apply text-gray my-4 font-black and @import 'tailwindcss/components.
From my experience from v0.7.1 to v0.8.3, 11ty stopped watching all addPassthroughCopy folders.
The only folder it watches is the "input" folder.
RE: https://github.com/josephdyer/skeleventy setup.
I'm closing this, since (using 0.9.0, not sure when it started) it can be resolved by setting setUseGitIgnore(false) and creating a .eleventyignore. If I recall correctly from when I opened the issue initially, even when setUseGitIgnore was false the directories would still be excluded from watching. Experimentally, this appears to no longer be the case.
Most helpful comment
As an update: Tracing through some code, I discovered that updates to files in
.gitignoreare ignored by the watcher. Addingconfig.setUseGitIgnore(false)to my config file resolves this, though the regression here surprises me.