diff --git a/lib/app/App.vue b/lib/app/App.vue index fa8ef6d403..e2e2cd4c8d 100644 --- a/lib/app/App.vue +++ b/lib/app/App.vue @@ -15,7 +15,7 @@ let layouts = { <% var layoutsKeys = Object.keys(layouts); layoutsKeys.forEach(function (key, i) { %> - "_<%= key %>": () => import('<%= layouts[key] %>' /* webpackChunkName: "layouts/<%= key %>" */)<%= (i + 1) < layoutsKeys.length ? ',' : '' %> + "_<%= key %>": () => import('<%= layouts[key] %>' /* webpackChunkName: "layouts/<%= key %>" */).then(m => m.default || m)<%= (i + 1) < layoutsKeys.length ? ',' : '' %> <% }) %> } diff --git a/lib/app/router.js b/lib/app/router.js index bb2df26f87..cbeb5acec7 100644 --- a/lib/app/router.js +++ b/lib/app/router.js @@ -23,7 +23,7 @@ function recursiveRoutes(routes, tab, components) { var _components = [] var _routes = recursiveRoutes(router.routes, '\t\t', _components) uniqBy(_components, '_name').forEach((route) => { %> -const <%= route._name %> = () => import('<%= relativeToBuild(route.component) %>' /* webpackChunkName: "pages/<%= route.name %>" */) +const <%= route._name %> = () => import('<%= relativeToBuild(route.component) %>' /* webpackChunkName: "pages/<%= route.name %>" */).then(m => m.default || m) <% }) %> <% if (router.scrollBehavior) { %>