UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

16 lines (14 loc) • 541 B
function pluginInlineOneServerUrl() { const serverUrl = process.env.ONE_SERVER_URL; return { visitor: { MemberExpression(nodePath) { const { node } = nodePath; if (node.object?.type === "MemberExpression" && node.object.object?.name === "process" && node.object.property?.name === "env" && node.property?.name === "ONE_SERVER_URL") { nodePath.replaceWith({ type: "StringLiteral", value: serverUrl || "" }); } } } }; } export { pluginInlineOneServerUrl as default }; //# sourceMappingURL=inline-one-server-url.mjs.map