Aakash N S
CDCloudflare Developers
•Created by Paolo of Lost Pages on 1/18/2024 in #pages-help
change pages functions watch directories in wrangler
Thanks, I've done the same! Didn't realize that might work. 😅
5 replies
CDCloudflare Developers
•Created by Paolo of Lost Pages on 1/18/2024 in #pages-help
change pages functions watch directories in wrangler
From the source code of wrangler, it does look like it only watches the
functions
directory: https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/pages/dev.ts#L433 (thanks @pc)
However, I was able to use chokidar-cli
and concurrently
to watch for changes in another source directory (called shared
in my project), and touch one of the files inside functions
to trigger a rebuild.
Here's what the scripts
sections of my package.json
looks like:
NOTE: I'm also using Tailwind CSS to watch and rebuild styles.5 replies
CDCloudflare Developers
•Created by Paolo of Lost Pages on 1/18/2024 in #pages-help
change pages functions watch directories in wrangler
were you able to figure out a solution to this?
5 replies