mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
use pify instead of utils.promisify for legacy build support
This commit is contained in:
parent
727ef16920
commit
3d2a7b29d1
@ -1,7 +1,7 @@
|
||||
import util from 'util'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
import pify from 'pify'
|
||||
import _ from 'lodash'
|
||||
import chokidar from 'chokidar'
|
||||
import fsExtra from 'fs-extra'
|
||||
@ -22,7 +22,7 @@ import PerfLoader from './webpack/utils/perf-loader'
|
||||
import ClientWebpackConfig from './webpack/client'
|
||||
import ServerWebpackConfig from './webpack/server'
|
||||
|
||||
const glob = util.promisify(Glob)
|
||||
const glob = pify(Glob)
|
||||
|
||||
export default class Builder {
|
||||
constructor(nuxt) {
|
||||
@ -539,7 +539,7 @@ export default class Builder {
|
||||
consola.debug('Adding webpack middleware...')
|
||||
|
||||
// Create webpack dev middleware
|
||||
this.webpackDevMiddleware = util.promisify(
|
||||
this.webpackDevMiddleware = pify(
|
||||
webpackDevMiddleware(
|
||||
compiler,
|
||||
Object.assign(
|
||||
@ -554,9 +554,9 @@ export default class Builder {
|
||||
)
|
||||
)
|
||||
|
||||
this.webpackDevMiddleware.close = util.promisify(this.webpackDevMiddleware.close)
|
||||
this.webpackDevMiddleware.close = pify(this.webpackDevMiddleware.close)
|
||||
|
||||
this.webpackHotMiddleware = util.promisify(
|
||||
this.webpackHotMiddleware = pify(
|
||||
webpackHotMiddleware(
|
||||
compiler,
|
||||
Object.assign(
|
||||
|
@ -99,6 +99,7 @@
|
||||
"mini-css-extract-plugin": "^0.4.0",
|
||||
"minimist": "^1.2.0",
|
||||
"opencollective": "^1.0.3",
|
||||
"pify": "^3.0.0",
|
||||
"postcss": "^6.0.22",
|
||||
"postcss-cssnext": "^3.1.0",
|
||||
"postcss-import": "^11.1.0",
|
||||
|
Loading…
Reference in New Issue
Block a user