Revert "feat: add webpackPrefetch to initial async chunk options (webpack 4.6.0)"

This reverts commit 09b141efa4.
This commit is contained in:
Pooya Parsa 2018-05-02 14:25:18 +04:30 committed by Pooya Parsa
parent 44d1e83c7f
commit 8feeeb0cfe
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import '<%= relativeToBuild(resolvePath(c.src || c)) %>'
<%= Object.keys(layouts).map(key => { <%= Object.keys(layouts).map(key => {
if (splitChunks.layouts) { 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 { } else {
return `import _${hash(key)} from '${layouts[key]}'` return `import _${hash(key)} from '${layouts[key]}'`
} }

View File

@ -26,7 +26,7 @@ const _routes = recursiveRoutes(router.routes, '\t\t', _components)
const name = route._name const name = route._name
if (splitChunks.pages) { 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 { } else {
return `import ${name} from '${path}'` return `import ${name} from '${path}'`
} }