Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSW setup instructions #292

Closed
wants to merge 1 commit into from

Conversation

petecartwright
Copy link

See #291 for some additional details.

With the current setup guide, users will get 404s in their terminal looking for mockServiceWorker.js.

This PR adds msw init to the setup guide, and adds the generated public/mockServiceWorker.js file to .gitignore and .dockerignore to minimize likelihood of it getting packaged for prod.

I went back and forth on whether this makes more sense in the ## Development section, or as a new ### Mocking section under ## Testing. Happy to make that change or any rephrase y'all prefer.

@MichaelDeBoey
Copy link
Member

@petecartwright I can't seem to reproduce the problem you're explaining.
I can just run npm run dev and look around in the app without any problem.

Tagging @kettanaito (the creator/maintainer of MSW) to know if we would need to add the created public/mockServiceWorker.js file or not

@petecartwright
Copy link
Author

Hm - thanks for looking! I can try to reproduce locally tomorrow. If I can’t replicate, I’ll close and we can pretend this never happened. 😀

@petecartwright
Copy link
Author

Closing, see #291 for a little more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants