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

Function environmentOf

ark/aot/unplugin.ts:3075–3079  ·  view source on GitHub ↗
(compiler: BundlerCompiler)

Source from the content-addressed store, hash-verified

3073
3074// webpack and Rspack build for production where no mode is set
3075const environmentOf = (compiler: BundlerCompiler): Environment => ({
3076 production: (compiler.options.mode ?? "production") === "production",
3077 testing: false,
3078 browser: targetsBrowser(compiler.options.target)
3079})
3080
3081// "web", a browserslist query or neither set, which webpack and Rspack read
3082// as one or the other; unknown where it's set false, for a plugin to decide

Callers 2

applyRspackFunction · 0.85
unplugin.tsFile · 0.85

Calls 1

targetsBrowserFunction · 0.85

Tested by

no test coverage detected