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