@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 762 B
JavaScript
import e from"node:path";const t=(e,t)=>{let n=new Set,r=e=>{if(!(!e||n.has(e.filename))){n.add(e.filename);for(let t of e.children)r(t)}};return r(t[e]),n},n=async e=>{let t=e.clearCache?new Set(Object.keys(e.loader.cache)):void 0;try{let t=await e.loader.import(e.specifier);return e.onLoad?.(),t}finally{if(t)for(let n of Object.keys(e.loader.cache))t.has(n)||delete e.loader.cache[n]}},r=async r=>{let i=r.dependencyEntryPath,a=new Set;return{module:await n({loader:r.loader,specifier:r.specifier,clearCache:r.clearCache??!1,onLoad:i?()=>{a=t(i,r.loader.cache)}:void 0}),dependencies:i?Array.from(a).filter(t=>t!==i&&!t.includes(`${e.sep}node_modules${e.sep}`)&&!t.endsWith(`.d.ts`)):[]}};export{r as default};
//# sourceMappingURL=load-config-module.mjs.map