Only create workers for usage locally
Hi there, I'm just getting started with Cloudflare pages - and it's super slick!
It looks like https://mswjs.io/ (MSW/Mock service worker) isn't supported in edge environments yet - and I'd like to make something similar.
I think I have what I want by adding to the functions folder, and it's working great. Create a new file
foojs
, hardcode the response - and make the FE hit it ❤️
However, I don't really want these mock functions deployed anywhere - is there a way of having 'local' functions vs 'deployed' functions? Some way of excluding these mocks from the build?
Thank you so much! Ollie0 Replies