MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / setup

Function setup

packages/@contentlayer/core/src/getConfig/index.ts:215–224  ·  view source on GitHub ↗
(build)

Source from the content-addressed store, hash-verified

213const contentlayerGenPlugin = (): esbuild.Plugin => ({
214 name: 'contentlayer-gen',
215 setup(build) {
216 build.onResolve({ filter: /contentlayer\/generated/ }, (args) => ({
217 path: args.path,
218 namespace: 'contentlayer-gen',
219 }))
220
221 build.onLoad({ filter: /.*/, namespace: 'contentlayer-gen' }, () => ({
222 contents: '// empty',
223 }))
224 },
225})
226
227// TODO also take tsconfig.json `paths` mapping into account

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…