wrapEnvironmentResolveId() — vite Function Reference
Architecture documentation for the wrapEnvironmentResolveId() function in build.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 75b51adf_73cc_4a69_e9d6_367d79ab1c2a["wrapEnvironmentResolveId()"] 45981d85_cbdd_e969_8c88_c17072ea0eda["build.ts"] 75b51adf_73cc_4a69_e9d6_367d79ab1c2a -->|defined in| 45981d85_cbdd_e969_8c88_c17072ea0eda d7a9e9fe_edc0_c70e_690b_4591b789faca["injectEnvironmentToHooks()"] d7a9e9fe_edc0_c70e_690b_4591b789faca -->|calls| 75b51adf_73cc_4a69_e9d6_367d79ab1c2a 58719e23_70bd_67e0_1ed8_f61c19ec725b["getHookHandler()"] 75b51adf_73cc_4a69_e9d6_367d79ab1c2a -->|calls| 58719e23_70bd_67e0_1ed8_f61c19ec725b 7d3ee640_04e8_d5d3_6065_cf5e3e14e4b7["injectEnvironmentInContext()"] 75b51adf_73cc_4a69_e9d6_367d79ab1c2a -->|calls| 7d3ee640_04e8_d5d3_6065_cf5e3e14e4b7 8d2a4ec7_9ff4_4748_5388_bbb3eedb7eb2["injectSsrFlag()"] 75b51adf_73cc_4a69_e9d6_367d79ab1c2a -->|calls| 8d2a4ec7_9ff4_4748_5388_bbb3eedb7eb2 b2845655_f75f_18a4_fb50_94d0f40983fe["wrapHookObject()"] 75b51adf_73cc_4a69_e9d6_367d79ab1c2a -->|calls| b2845655_f75f_18a4_fb50_94d0f40983fe style 75b51adf_73cc_4a69_e9d6_367d79ab1c2a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/build.ts lines 1331–1353
function wrapEnvironmentResolveId(
environment: Environment,
hook: Plugin['resolveId'] | undefined,
pluginName: string,
): Plugin['resolveId'] {
if (!hook) return
const fn = getHookHandler(hook)
const handler: Plugin['resolveId'] = function (id, importer, options) {
return fn.call(
injectEnvironmentInContext(this, environment),
id,
importer,
injectSsrFlag(options, environment, pluginName),
)
}
if ('handler' in hook) {
return wrapHookObject(hook, handler)
} else {
return handler
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does wrapEnvironmentResolveId() do?
wrapEnvironmentResolveId() is a function in the vite codebase, defined in packages/vite/src/node/build.ts.
Where is wrapEnvironmentResolveId() defined?
wrapEnvironmentResolveId() is defined in packages/vite/src/node/build.ts at line 1331.
What does wrapEnvironmentResolveId() call?
wrapEnvironmentResolveId() calls 4 function(s): getHookHandler, injectEnvironmentInContext, injectSsrFlag, wrapHookObject.
What calls wrapEnvironmentResolveId()?
wrapEnvironmentResolveId() is called by 1 function(s): injectEnvironmentToHooks.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free