MCPcopy Create free account
hub / github.com/babel/babel / getSource

Function getSource

packages/babel-plugin-transform-react-jsx/src/create-plugin.ts:786–798  ·  view source on GitHub ↗
(source: string, importName: string)

Source from the content-addressed store, hash-verified

784 });
785
786 function getSource(source: string, importName: string) {
787 switch (importName) {
788 case "Fragment":
789 return `${source}/${development ? "jsx-dev-runtime" : "jsx-runtime"}`;
790 case "jsxDEV":
791 return `${source}/jsx-dev-runtime`;
792 case "jsx":
793 case "jsxs":
794 return `${source}/jsx-runtime`;
795 case "createElement":
796 return source;
797 }
798 }
799
800 function createImportLazily(
801 pass: PluginPass,

Callers 1

createImportLazilyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected