You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hence I can't use a filter like file => file.endsWith('.js') because that excludes directories that don't end with .js.
The docs only mention files:
filter : Function to filter copied files. Return true to include, false to exclude. Can also return a Promise that resolves to true or false (or pass in an async function).
However when I log what the filter gets called with, it gets called with directories.
The text was updated successfully, but these errors were encountered:
Ah, yeah; docs aren't well-written here. Calling with directories is intended behavior, but docs should reflect that. PR welcome to clarify docs. Also CC @manidlou
okay, I'll also make a separate issue about passing isDirectory to the filter, since I'm pretty sure copy already knows that so it would be a waste for the filter function to have to stat the path.
Hence I can't use a filter like
file => file.endsWith('.js')
because that excludes directories that don't end with.js
.The docs only mention files:
However when I log what the filter gets called with, it gets called with directories.
The text was updated successfully, but these errors were encountered: