Open WangShuXian6 opened 2 years ago
https://github.com/liriliri/eruda https://github.com/liriliri/eruda/blob/master/doc/README_CN.md Eruda 是一个专为手机网页前端设计的调试面板,类似 DevTools 的迷你版,其主要功能包括:捕获 console 日志、检查元素状态、捕获XHR请求、显示本地存储和 Cookie 信息等等。
npm install eruda --save
src/type.d.ts
declare module 'eruda'
tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src", "src/type.d.ts" ] }
初始化
import eruda from 'eruda' eruda.init()
Commissioning 调试