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

Function definedProblemOf

ark/aot/unplugin.ts:2154–2165  ·  view source on GitHub ↗
({ options }: BundlerCompiler)

Source from the content-addressed store, hash-verified

2152
2153// webpack's DefinePlugin holds its definitions, and Rspack's its arguments
2154const definedProblemOf = ({ options }: BundlerCompiler) => {
2155 for (const plugin of options.plugins ?? []) {
2156 const { definitions, name, _args, constructor } = (plugin ??
2157 {}) as DefinePluginLike
2158 // by name, as a config may construct it from another copy of webpack,
2159 // and not ProvidePlugin, which holds definitions of imports
2160 if (constructor?.name !== "DefinePlugin" && name !== "DefinePlugin")
2161 continue
2162 const problem = unreadDefineOf(definitions ?? _args?.[0])
2163 if (problem) return problem
2164 }
2165}
2166
2167// webpack leaves a side-effect-free module's re-exports unbuilt until a module
2168// asks for their names, and forgets what was asked of one that had none. A

Callers 1

answerBuiltFunction · 0.85

Calls 1

unreadDefineOfFunction · 0.90

Tested by

no test coverage detected