mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(ssr): update ssr/client manifect after webpack v5 beta.30 (#48)
This commit is contained in:
parent
a9f3ccf099
commit
db050fd0a2
@ -24,7 +24,7 @@ export default class VueSSRClientPlugin {
|
|||||||
|
|
||||||
const initialFiles = uniq(Object.keys(stats.entrypoints)
|
const initialFiles = uniq(Object.keys(stats.entrypoints)
|
||||||
.map(name => stats.entrypoints[name].assets)
|
.map(name => stats.entrypoints[name].assets)
|
||||||
.reduce((assets, all) => all.concat(assets), [])
|
.reduce((files, entryAssets) => files.concat(entryAssets.map(entryAsset => entryAsset.name)), [])
|
||||||
.filter(file => isJS(file) || isCSS(file)))
|
.filter(file => isJS(file) || isCSS(file)))
|
||||||
|
|
||||||
const asyncFiles = allFiles
|
const asyncFiles = allFiles
|
||||||
@ -70,7 +70,7 @@ export default class VueSSRClientPlugin {
|
|||||||
const chunkGroup = namedChunkGroups[chunkName]
|
const chunkGroup = namedChunkGroups[chunkName]
|
||||||
if (chunkGroup) {
|
if (chunkGroup) {
|
||||||
for (const asset of chunkGroup.assets) {
|
for (const asset of chunkGroup.assets) {
|
||||||
filesSet.add(fileToIndex(asset))
|
filesSet.add(fileToIndex(asset.name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export default class VueSSRServerPlugin {
|
|||||||
return cb()
|
return cb()
|
||||||
}
|
}
|
||||||
|
|
||||||
const entryAssets = entryInfo.assets.filter(isJS)
|
const entryAssets = entryInfo.assets.filter(asset => isJS(asset.name))
|
||||||
|
|
||||||
if (entryAssets.length > 1) {
|
if (entryAssets.length > 1) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
@ -39,14 +39,14 @@ export default class VueSSRServerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [entry] = entryAssets
|
const [entry] = entryAssets
|
||||||
if (!entry || typeof entry !== 'string') {
|
if (!entry || typeof entry.name !== 'string') {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Entry "${entryName}" not found. Did you specify the correct entry option?`
|
`Entry "${entryName}" not found. Did you specify the correct entry option?`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const bundle = {
|
const bundle = {
|
||||||
entry,
|
entry: entry.name,
|
||||||
files: {},
|
files: {},
|
||||||
maps: {}
|
maps: {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user