(source, importer)
| 21 | const resolveTsAsJs = () => ({ |
| 22 | name: 'resolve-ts-as-js', |
| 23 | resolveId(source, importer) { |
| 24 | if (importer && source.startsWith('.') && source.endsWith('.js')) { |
| 25 | const candidate = path.resolve( |
| 26 | path.dirname(importer), |
| 27 | source.slice(0, -3) + '.ts' |
| 28 | ); |
| 29 | if (fs.existsSync(candidate)) { |
| 30 | return candidate; |
| 31 | } |
| 32 | } |
| 33 | return null; |
| 34 | }, |
| 35 | }); |
| 36 | |
| 37 | module.exports = { |
nothing calls this directly
no outgoing calls
no test coverage detected