mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
update vue server webpack-plugin
This commit is contained in:
parent
298c386213
commit
e467007f94
@ -24,14 +24,7 @@ exports.validate = compiler => {
|
||||
exports.onEmit = (compiler, name, hook) => {
|
||||
if (compiler.hooks) {
|
||||
// Webpack >= 4.0.0
|
||||
compiler.hooks.emit.tap(name,
|
||||
(compilation) => new Promise((resolve, reject) => {
|
||||
try {
|
||||
hook(compilation, resolve)
|
||||
} catch (e) {
|
||||
reject(e)
|
||||
}
|
||||
}))
|
||||
compiler.hooks.emit.tapAsync(name, hook)
|
||||
} else {
|
||||
// Webpack < 4.0.0
|
||||
compiler.plugin('emit', hook)
|
||||
|
Loading…
Reference in New Issue
Block a user