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

Function startBuild

ark/aot/unplugin.ts:261–278  ·  view source on GitHub ↗
(this: object | void)

Source from the content-addressed store, hash-verified

259 }
260 // a build fails under settings it can't build with
261 function startBuild(this: object | void) {
262 reset()
263 if (!changedSettings) return
264 // webpack and Rspack run this in the compiler's `make` hook, where a
265 // rejection fails the whole compiler instead of the compilation, which
266 // Next's dev server then waits on for good, so it's the compilation's
267 // error there, as an error in a module is
268 const { compilation } =
269 (
270 this as { getNativeBuildContext?: () => NativeBuild } | undefined
271 )?.getNativeBuildContext?.() ?? {}
272 if (compiler && compilation) {
273 return void (compilation as BundlerCompilation).errors.push(
274 new compiler.webpack.WebpackError(changedSettings)
275 )
276 }
277 throwBuildError(changedSettings)
278 }
279 // resolving arktype for a module outside node_modules doesn't wait on the
280 // worker, which may wait on the bundler
281 const readDependency = async (

Callers

nothing calls this directly

Calls 3

throwBuildErrorFunction · 0.90
resetFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected