(code: string)
| 499 | } |
| 500 | |
| 501 | function stripCoreGlobalsImports(code: string): string { |
| 502 | const pattern = /^\s*(?:import\s+(?:[^'"\n]*from\s+)?|export\s+\*\s+from\s+)["'][^"']*(?:@nativescript(?:[/_-])core(?:[\/_-])globals|@nativescript_core_globals)[^"']*["'];?\s*$/gm; |
| 503 | return code.replace(pattern, ''); |
| 504 | } |
| 505 | |
| 506 | function ensureVariableDynamicImportHelper(code: string): string { |
| 507 | if (!code.includes('__variableDynamicImportRuntimeHelper')) { |