Skip to content

🚀 Feature Request: make temp file directory configurable #4299

@lensbart

Description

@lensbart

Describe the solution

I’m using Cloudflare Pages with Remix, following https://github.com/remix-run/remix/tree/main/templates/cloudflare-pages.

I’m using Yarn 4 with Plug‘n’Play / zero-installs.

When using wrangler via wrangler pages dev, several temporary file directories are created:

  • .wrangler/
  • node_modules/.cache/wrangler/user-id.json
  • node_modules/.mf/cf.json

This is unexpected, because Yarn PnP doesn’t use a node_modules folder.

I would like to group temporary/cache files in a .cache directory, insofar configurable. Therefore it would be nice if wrangler pages dev would accept a CLI argument to configure the .wrangler directory location, so that I could colocate it with to other cache/temp files.

It would also be nice if the Wrangler CLI would either detect when a project uses Yarn PnP (e.g. by checking the existence of .pnp.cjs) and, if so, don’t create a node_modules folder, or, allowing the user to configure the locations of node_modules/.cache/wrangler/user-id.json and node_modules/.mf/cf.json as well.

Thank you!

Metadata

Metadata

Labels

enhancementNew feature or requestpagesRelating to Pagesquick winPotentially easy/straightforward issue to tackle

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions