onEmit() — vue Function Reference
Architecture documentation for the onEmit() function in util.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 36b166aa_57d3_9983_a5be_002e851079e6["onEmit()"] 74eda736_a9d6_2af5_f33c_09c446bcada2["apply()"] 74eda736_a9d6_2af5_f33c_09c446bcada2 -->|calls| 36b166aa_57d3_9983_a5be_002e851079e6 09122b38_dac2_9227_e65b_faac3854891b["apply()"] 09122b38_dac2_9227_e65b_faac3854891b -->|calls| 36b166aa_57d3_9983_a5be_002e851079e6 style 36b166aa_57d3_9983_a5be_002e851079e6 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