Closed alteredorange closed 4 years ago
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/jakobrosenberg/routify-starter/r7efmoxw5 ✅ Preview: https://routify-starter-git-fork-alteredorange-master.jakobrosenberg.now.sh
Thanks for the PR. What's the reasoning behind removing del
?
@rixo would this work with your rollup-plugin-copy-watcher
?
Oops, sorry didn't mean to remove del, I thought it was deleting the double copied files. I see it's what's used to delete the whole directory when building, my mistake!
@jakobrosenberg Well, if it works with rollup-plugin-copy
, it should work with rollup-plugin-copy-watch
. I just added chokidar, and on change to the designated targets, it dumbly reruns the whole copy operation of the original plugin...
I also tested the assumption and, indeed, this silly plugin doesn't dedup files, so I also think the fix is needed.
del
should stay though, except if I'm missing something too.
@alteredorange if you make a pr for the beta branch I'll merge it. Remember del
.
Super, I fixed the del issue and added a pr for the beta branch. Thanks!
Current copy command copies static folder recursively. If you have a large number of static assets multiple levels deep, everything will be copied twice (once to /dist/* and once to /dist/correctfolder/. If you have hundreds or thousands of files in static, this might impact build time. Just copying the static dir with / instead of / appears to fix this issue. It also remove the additional step of del.sync(distDir + '/') and the del import.