-
Hi, I have error when running msw in my github-pages. I use create-react-app on my public repository.
Code, how I use msw on src/index.tsx Maybe someone can help me? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey, @gaisdav. As the error suggests, you need to serve the It's also worth mentioning that you rarely need API mocking in production. While you may use it for educational purposes, or for the purpose of mocking API calls on an otherwise static site, it's generally discouraged to deploy MSW to production. Just be cautious about this. |
Beta Was this translation helpful? Give feedback.
-
I found what was the problem. https://mswjs.io/docs/getting-started/integrate/browser#using-homepage-property-in-packagejson |
Beta Was this translation helpful? Give feedback.
I found what was the problem.
It was necessary to write the correct path to the mockServiceWorker.js file.
I have attached a link to the documentation below.
https://mswjs.io/docs/getting-started/integrate/browser#using-homepage-property-in-packagejson