Open shivan-s opened 1 year ago
Unfortunately this isn't something that's possible today, but this is definitely something we could consider trying to support!
Hey! ๐ As a quick update, this is something we're planning to expose as part of the work to stabilise unstable_dev
. Miniflare provides outboundService
and fetchMock
options that we should be able to pass through to Wrangler. ๐
Hey again! ๐ Considering Miniflare now provides outboundService
and fetchMock
options, I'm going to transfer this back to cloudflare/workers-sdk
. This is something we should be able to support as part of our work to rearchitect wrangler dev
as a library. /cc @RamIdeas
Hi.
It seems like outboundService
and fetchMock
can be passed here.
https://github.com/cloudflare/workers-sdk/blob/51cc4f806e2fea826f10f4249df2ed0b792763a5/packages/wrangler/src/dev.tsx#L728-L768
Is there something bothering you? If I can help you, please let me know
Describe the solution
I used the package,
msw
to mock some external URLs, but if you use theunstable_dev
then external call are still made and they aren't interceptors.Is there anyway this could in included into the
wrangler
framework, or am I mistaken?