import{generateServerPropsEntry as p}from"./codegen/index.js";const t="server-props-ns",a=r=>({name:"esbuild-redocly-server-props-resolver",setup:s=>{s.onResolve({filter:/@portal\/server-props/},e=>{const o=[...Array.from(r.serverPropsGetters.values()),...Array.from(r.pagePropsGetters.values())];return{namespace:t,path:e.path,watchFiles:o}}),s.onLoad({filter:/@portal\/server-props/,namespace:t},()=>{const e=[...Array.from(r.serverPropsGetters.entries()),...Array.from(r.pagePropsGetters.entries())];return{contents:p(e),resolveDir:"/",loader:"ts"}})}});export{a as ServerPropsResolver};
