UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

21 lines (20 loc) 629 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