说明 mock-data如果存在则不覆盖 需要在package.json中指定公共资源目录,存放mockServiceWorker.js "msw": { "workerDirectory": [ "public" ] }