* Check if an import spec should be remapped to dep-*.mjs
(spec: string)
| 638 | * Check if an import spec should be remapped to dep-*.mjs |
| 639 | */ |
| 640 | function shouldRemapImport(spec: string): boolean { |
| 641 | if (!spec || typeof spec !== 'string') return false; |
| 642 | if (VENDOR_PACKAGES.test(spec)) return false; |
| 643 | if (isNativeScriptCoreModule(spec)) return false; |
| 644 | if (isNativeScriptPluginModule(spec)) return false; |
| 645 | if (resolveVendorFromCandidate(spec)) return false; |
| 646 | if (spec.startsWith('~/')) return false; |
| 647 | if (SKIP_PATTERNS.test(spec)) return false; |
| 648 | if (!spec.startsWith('/') && !spec.startsWith('./') && !spec.startsWith('../')) { |
| 649 | return false; |
| 650 | } |
| 651 | return true; |
| 652 | } |
| 653 | |
| 654 | // (legacy wrapSfcWithStableDefault removed; full SFCs now delegate to /ns/asm) |
| 655 |
no test coverage detected