(source, importer)
| 7 | name: 'vite:nativescript', |
| 8 | |
| 9 | resolveId(source, importer) { |
| 10 | const platform = options.platform; |
| 11 | if (!platform || !importer || source.startsWith('.') === false) { |
| 12 | return null; |
| 13 | } |
| 14 | |
| 15 | const resolved = path.resolve(path.dirname(importer), source); |
| 16 | const extVariants = ['.ts', '.js']; |
| 17 | |
| 18 | for (const ext of extVariants) { |
| 19 | const file = resolveNativeScriptPlatformFile(resolved + ext, platform); |
| 20 | if (file) { |
| 21 | return file; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | return null; |
| 26 | }, |
| 27 | |
| 28 | transform(code, id) { |
| 29 | if (id.endsWith('.xml')) { |
nothing calls this directly
no test coverage detected