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! Ollie
Mock Service Worker
Mock Service Worker
Seamless API mocking library for browser and Node.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?