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