(node)
| 168 | } |
| 169 | }, |
| 170 | CallExpression(node) { |
| 171 | const source = node.arguments[0]; |
| 172 | if (isImportMetaResolve(node) && isStringLiteral(source)) { |
| 173 | const value = getStringLiteralValue(source); |
| 174 | const resolution = isPathImport(value) && !isJavaScript(value) ? resolveFile(value) : resolveImport(value); |
| 175 | output.replaceLeft( |
| 176 | node.start, |
| 177 | node.end, |
| 178 | isPathImport(resolution) |
| 179 | ? `new URL(${JSON.stringify(resolution)}, location).href` |
| 180 | : JSON.stringify(resolution) |
| 181 | ); |
| 182 | } |
| 183 | } |
| 184 | }); |
| 185 | } |
| 186 |
nothing calls this directly
no test coverage detected