mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
refactor: small improvements (#4194)
This commit is contained in:
parent
a3ba6e96ca
commit
48393b33c7
@ -29,7 +29,8 @@ import {
|
|||||||
relativeTo,
|
relativeTo,
|
||||||
waitFor,
|
waitFor,
|
||||||
determineGlobals,
|
determineGlobals,
|
||||||
stripWhitespace
|
stripWhitespace,
|
||||||
|
isString
|
||||||
} from '@nuxt/common'
|
} from '@nuxt/common'
|
||||||
|
|
||||||
const glob = pify(Glob)
|
const glob = pify(Glob)
|
||||||
@ -372,7 +373,7 @@ export default class Builder {
|
|||||||
custom: customFileExists
|
custom: customFileExists
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.filter(i => !!i)
|
.filter(Boolean)
|
||||||
|
|
||||||
// -- Custom templates --
|
// -- Custom templates --
|
||||||
// Add custom template files
|
// Add custom template files
|
||||||
@ -524,7 +525,7 @@ export default class Builder {
|
|||||||
watchServer() {
|
watchServer() {
|
||||||
const nuxtRestartWatch = concat(
|
const nuxtRestartWatch = concat(
|
||||||
this.options.serverMiddleware
|
this.options.serverMiddleware
|
||||||
.filter(i => typeof i === 'string')
|
.filter(isString)
|
||||||
.map(this.nuxt.resolver.resolveAlias),
|
.map(this.nuxt.resolver.resolveAlias),
|
||||||
this.options.watch.map(this.nuxt.resolver.resolveAlias),
|
this.options.watch.map(this.nuxt.resolver.resolveAlias),
|
||||||
path.join(this.options.rootDir, 'nuxt.config.js')
|
path.join(this.options.rootDir, 'nuxt.config.js')
|
||||||
|
@ -99,7 +99,7 @@ export default class PostcssConfig {
|
|||||||
const instance = plugin(opts)
|
const instance = plugin(opts)
|
||||||
return instance
|
return instance
|
||||||
})
|
})
|
||||||
.filter(e => e)
|
.filter(Boolean)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user