mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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)
|
||||
.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)))
|
||||
|
||||
const asyncFiles = allFiles
|
||||
@ -70,7 +70,7 @@ export default class VueSSRClientPlugin {
|
||||
const chunkGroup = namedChunkGroups[chunkName]
|
||||
if (chunkGroup) {
|
||||
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()
|
||||
}
|
||||
|
||||
const entryAssets = entryInfo.assets.filter(isJS)
|
||||
const entryAssets = entryInfo.assets.filter(asset => isJS(asset.name))
|
||||
|
||||
if (entryAssets.length > 1) {
|
||||
throw new Error(
|
||||
@ -39,14 +39,14 @@ export default class VueSSRServerPlugin {
|
||||
}
|
||||
|
||||
const [entry] = entryAssets
|
||||
if (!entry || typeof entry !== 'string') {
|
||||
if (!entry || typeof entry.name !== 'string') {
|
||||
throw new Error(
|
||||
`Entry "${entryName}" not found. Did you specify the correct entry option?`
|
||||
)
|
||||
}
|
||||
|
||||
const bundle = {
|
||||
entry,
|
||||
entry: entry.name,
|
||||
files: {},
|
||||
maps: {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user