MCPcopy
hub / github.com/lingodotdev/lingo.dev / transform

Function transform

packages/compiler/src/index.ts:135–151  ·  view source on GitHub ↗
(code, id)

Source from the content-addressed store, hash-verified

133 transformInclude: (id) => id.endsWith(".tsx") || id.endsWith(".jsx"),
134 enforce: "pre",
135 transform(code, id) {
136 try {
137 const result = transformComponent({
138 code,
139 params,
140 resourcePath: id,
141 sourceRoot: params.sourceRoot,
142 });
143
144 return result;
145 } catch (error) {
146 console.error("⚠️ Lingo.dev compiler failed to localize your app");
147 console.error("⚠️ Details:", error);
148
149 return code;
150 }
151 },
152 };
153 },
154);

Callers

nothing calls this directly

Calls 2

transformComponentFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected