DEV Community

Discussion on: Using MSW (Mock Service Worker) in an Angular project

Collapse
 
hjennings profile image
Hunter Jennings

Hey Tim, this was such a helpful article, thank you so much for posting! Quick question: I was wondering if by adding "src/mockServiceWorker.js" wouldn't that ship the service worker with along with the production code? I have a very similar setup that I'm working with and everything outlined in this article works perfectly, but I have yet to figure out the proper way to only include the mockServiceWorker.js outside of production mode. Any help with this would be much appreciated! Here's my test repo: github.com/h-jennings/angular-app-...

Collapse
 
hjennings profile image
Hunter Jennings

Question was answered in this github issue: github.com/mswjs/examples/issues/34