(this: object | void)
| 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 ( |
nothing calls this directly
no test coverage detected