MCPcopy Create free account
hub / github.com/arktypeio/arktype / writePrecompileWorker

Function writePrecompileWorker

ark/docs/lib/writePrecompileWorker.ts:43–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 * build does, which reads the runtime's files.
42 */
43export const writePrecompileWorker = () => {
44 const bundled = bundleRuntime()
45 const precompileRuntime: PrecompileRuntime = {
46 ...bundled,
47 ...runtimeReachesOf(Object.keys(bundled.localsByExport))
48 }
49 buildSync({
50 entryPoints: [
51 join(docsDir, "components", "playground", "precompile.worker.ts")
52 ],
53 outfile: join(publicDir, precompileWorkerUrl),
54 bundle: true,
55 format: "esm",
56 platform: "browser",
57 target: "es2022",
58 minify: true,
59 define: { precompileRuntime: JSON.stringify(precompileRuntime) },
60 logLevel: "warning"
61 })
62}

Callers 1

next.config.tsFile · 0.90

Calls 3

runtimeReachesOfFunction · 0.90
bundleRuntimeFunction · 0.85
joinFunction · 0.85

Tested by

no test coverage detected