import{isProductionMode as e}from"../../../../shared/env.js";import{buildScript as o}from"./build-script.js";import{resolveBrowserHooksPath as i}from"./resolve-browser-hooks.js";async function u(){return{id:"Rudderstack Analytics",requiredEntitlements:["analytics"],async processContent(t,{getConfig:n}){const r=(await n())?.analytics?.rudderstack;!r?.writeKey||!e()&&!r.includeInDevelopment||(t.addSsrComponents([o(r)],"head"),t.addBrowserPlugin(i()))}}}export{u as rudderstackAnalyticsPlugin};
