(id)
| 62 | const error = payload.data |
| 63 | const stacks = parseErrorStacktrace(error, { |
| 64 | getUrlId(id) { |
| 65 | const moduleGraph = environment.moduleGraph |
| 66 | const mod = moduleGraph.getModuleById(id) |
| 67 | if (mod) { |
| 68 | return id |
| 69 | } |
| 70 | const resolvedPath = normalizePath( |
| 71 | path.resolve(environment.config.root, id.slice(1)), |
| 72 | ) |
| 73 | const modUrl = moduleGraph.getModuleById(resolvedPath) |
| 74 | if (modUrl) { |
| 75 | return resolvedPath |
| 76 | } |
| 77 | // some browsers (looking at you, safari) don't report queries in stack traces |
| 78 | // the next best thing is to try the first id that this file resolves to |
| 79 | const files = moduleGraph.getModulesByFile(resolvedPath) |
| 80 | if (files && files.size) { |
| 81 | return files.values().next().value!.id! |
| 82 | } |
| 83 | return id |
| 84 | }, |
| 85 | getSourceMap(id) { |
| 86 | if (sourceMapCache.has(id)) { |
| 87 | return sourceMapCache.get(id) |
nothing calls this directly
no test coverage detected