我使用typescript模板构建了一个Create React App应用程序,然后使用npm安装了MSW,并根据MSW的安装指南创建了文件。
对于jest来说完美运行,但是当我使用start脚本时,在浏览器中会收到一堆警告消息:
对于jest来说完美运行,但是当我使用start脚本时,在浏览器中会收到一堆警告消息:
WARNING in ./node_modules/@mswjs/interceptors/lib/utils/uuid.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '<ROOT_DIR>\node_modules\@mswjs\interceptors\src\utils\uuid.ts' file: Error: ENOENT: no such file or directory, open '<ROOT_DIR>\node_modules\@mswjs\interceptors\src\utils\uuid.ts'
@ ./node_modules/@mswjs/interceptors/lib/interceptors/fetch/index.js 167:13-40
@ ./node_modules/msw/lib/esm/index.js 12:0-76 1568:14-28
@ ./src/mocks/browser.ts 3:0-34 6:22-33
@ ./src/index.tsx 8:0-41 10:0-12
和相似的内容...
我找不到任何答案,所以向您请求帮助。