Create React App with custom homepage
#466
-
FeedbackDoes Mock service worker with Create react app? I always get below error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, @marinamas. Yes, MSW works with Create React App. The error that you're getting is google-able and means you have forgotten to generate the worker script. Double-check that the script is in your public directory and you are serving it correctly.
|
Beta Was this translation helpful? Give feedback.
-
Thank you for getting back . I tried multiple ways to fix this issue. Thanks Again |
Beta Was this translation helpful? Give feedback.
Hi, @marinamas.
Yes, MSW works with Create React App. The error that you're getting is google-able and means you have forgotten to generate the worker script. Double-check that the script is in your public directory and you are serving it correctly.
/mockServiceWorker.js
gives 404 right now. If you're using a customhomepage
property inpackage.json
, also see this recipe.