mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Merge branch 'dev' into feat/esm
This commit is contained in:
commit
763f1163f6
@ -24,14 +24,7 @@ export const validate = compiler => {
|
||||
export const 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