onEmit() — vue Function Reference
Architecture documentation for the onEmit() function in util.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD e71dc5e5_977d_fb3b_28ae_18c134c7b1ad["onEmit()"] cfb31c39_d51c_a2b5_4da2_0c5d7c929287["apply()"] cfb31c39_d51c_a2b5_4da2_0c5d7c929287 -->|calls| e71dc5e5_977d_fb3b_28ae_18c134c7b1ad 18e811fb_6a44_e4ce_30bb_8457653dc5d4["apply()"] 18e811fb_6a44_e4ce_30bb_8457653dc5d4 -->|calls| e71dc5e5_977d_fb3b_28ae_18c134c7b1ad style e71dc5e5_977d_fb3b_28ae_18c134c7b1ad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/webpack-plugin/util.ts lines 35–58
export const onEmit = (compiler, name, stageName, hook) => {
if (isWebpack5) {
// Webpack >= 5.0.0
compiler.hooks.compilation.tap(name, compilation => {
if (compilation.compiler !== compiler) {
// Ignore child compilers
return
}
const stage = webpack.Compilation[stageName]
compilation.hooks.processAssets.tapAsync(
{ name, stage },
(assets, cb) => {
hook(compilation, cb)
}
)
})
} else if (compiler.hooks) {
// Webpack >= 4.0.0
compiler.hooks.emit.tapAsync(name, hook)
} else {
// Webpack < 4.0.0
compiler.plugin('emit', hook)
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does onEmit() do?
onEmit() is a function in the vue codebase.
What calls onEmit()?
onEmit() is called by 2 function(s): apply, apply.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free