MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / ImportExpression

Function ImportExpression

packages/vite/hmr/helpers/ast-normalizer.ts:270–280  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

268 }
269 },
270 ImportExpression(path) {
271 const arg = path.node.source;
272 if (t.isStringLiteral(arg)) {
273 const src = arg.value;
274 if (isVueLike(src)) {
275 path.node.source = t.stringLiteral('/ns/rt');
276 } else if (isNsCorePackage(src)) {
277 path.node.source = t.stringLiteral('/ns/core');
278 }
279 }
280 },
281 CallExpression(path) {
282 if (t.isImport(path.node.callee) || (t.isIdentifier(path.node.callee) && path.node.callee.name === 'import')) {
283 const first = path.node.arguments[0];

Callers

nothing calls this directly

Calls 2

isVueLikeFunction · 0.85
isNsCorePackageFunction · 0.85

Tested by

no test coverage detected