mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Revert "feat: add webpackPrefetch to initial async chunk options (webpack 4.6.0)"
This reverts commit 09b141efa4
.
This commit is contained in:
parent
44d1e83c7f
commit
8feeeb0cfe
@ -6,7 +6,7 @@ import '<%= relativeToBuild(resolvePath(c.src || c)) %>'
|
||||
|
||||
<%= Object.keys(layouts).map(key => {
|
||||
if (splitChunks.layouts) {
|
||||
return `const _${hash(key)} = () => import('${layouts[key]}' /* webpackPrefetch: true, 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 _${hash(key)} from '${layouts[key]}'`
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ const _routes = recursiveRoutes(router.routes, '\t\t', _components)
|
||||
const name = route._name
|
||||
|
||||
if (splitChunks.pages) {
|
||||
return `const ${name} = () => import('${path}' /* webpackPrefetch: true, webpackChunkName: "${chunkName}" */).then(m => m.default || m)`
|
||||
return `const ${name} = () => import('${path}' /* webpackChunkName: "${chunkName}" */).then(m => m.default || m)`
|
||||
} else {
|
||||
return `import ${name} from '${path}'`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user