mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(dynamic components): temporary fix for vue-loader 13.0.0
This commit is contained in:
parent
aaf924f49d
commit
9226f606b5
@ -180,6 +180,8 @@ async function render (to, from, next) {
|
||||
return Promise.all(promises)
|
||||
.then(() => {
|
||||
Object.keys(_this.components).forEach((name) => {
|
||||
// Sanetize resolved components (Temporary workaround for vue-loader 13.0.0)
|
||||
_this.components[name] = _this.components[name].default || _this.components[name]
|
||||
Component.options.components[name] = _this.components[name]
|
||||
})
|
||||
})
|
||||
|
@ -159,6 +159,10 @@ export default async (context) => {
|
||||
.then((data) => {
|
||||
// If not dyanmic component, return data directly
|
||||
if (Object.keys(_this.components).length === 0) return data
|
||||
// Sanetize resolved components (Temporary workaround for vue-loader 13.0.0)
|
||||
Object.keys(_this.components).forEach(name => {
|
||||
_this.components[name] = _this.components[name].default || _this.components[name]
|
||||
})
|
||||
// Tell renderer that dynamic components has been added
|
||||
context.hasDynamicComponents = true
|
||||
// Add Component on server side (clone of it)
|
||||
|
Loading…
Reference in New Issue
Block a user