mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
builder no longer needs init
This commit is contained in:
parent
7343af0d5f
commit
59f8e48549
@ -42,23 +42,6 @@ export default class Builder extends Tapable {
|
||||
this.webpackDevMiddleware = null
|
||||
this.webpackHotMiddleware = null
|
||||
|
||||
if (nuxt.initialized) {
|
||||
// If nuxt already initialized
|
||||
this._init = this.init().catch(this.nuxt.errorHandler)
|
||||
} else {
|
||||
// Wait for hook
|
||||
this.nuxt.plugin('init', () => {
|
||||
this._init = this.init()
|
||||
return this._init
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async init () {
|
||||
if (this._init) {
|
||||
return this._init
|
||||
}
|
||||
|
||||
// Add extra loaders only if they are not already provided
|
||||
let extraDefaults = {}
|
||||
if (this.options.build && !Array.isArray(this.options.build.loaders)) {
|
||||
|
Loading…
Reference in New Issue
Block a user