mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: hash route names
This commit is contained in:
parent
86d0031ae6
commit
1dc6a9d788
@ -6,13 +6,13 @@ import '<%= relativeToBuild(resolvePath(c.src || c)) %>'
|
||||
|
||||
<%= Object.keys(layouts).map(key => {
|
||||
if (splitPages) {
|
||||
return `const _${key} = () => import('${layouts[key]}' /* webpackChunkName: "${wChunk('layouts/' + key)}" */).then(m => m.default || m)`
|
||||
return `const _${hash(key)} = () => import('${layouts[key]}' /* webpackChunkName: "${wChunk('layouts/' + key)}" */).then(m => m.default || m)`
|
||||
} else {
|
||||
return `import _${key} from '${layouts[key]}'`
|
||||
return `import _${hash(key)} from '${layouts[key]}'`
|
||||
}
|
||||
}).join('\n') %>
|
||||
|
||||
const layouts = { <%= Object.keys(layouts).map(key => '_' + key).join(',') %> }
|
||||
const layouts = { <%= Object.keys(layouts).map(key => `"_${key}": _${hash(key)}`).join(',') %> }
|
||||
|
||||
<% if (splitPages) { %>let resolvedLayouts = {}<% } %>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user