mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(webpack): fix production font preloading (#5436)
This commit is contained in:
parent
f5bbc585ee
commit
aea9db6f56
@ -60,6 +60,17 @@ export default class VueSSRClientPlugin {
|
||||
const id = m.identifier.replace(/\s\w+$/, '') // remove appended hash
|
||||
const files = manifest.modules[hash(id)] = chunk.files.map(fileToIndex)
|
||||
|
||||
// In production mode, modules may be concatenated by scope hoisting
|
||||
// Include ConcatenatedModule for not losing module-component mapping
|
||||
if (Array.isArray(m.modules)) {
|
||||
for (const concatenatedModule of m.modules) {
|
||||
const id = hash(concatenatedModule.identifier.replace(/\s\w+$/, ''))
|
||||
if (!manifest.modules[id]) {
|
||||
manifest.modules[id] = files
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find all asset modules associated with the same chunk
|
||||
assetModules.forEach((m) => {
|
||||
if (m.chunks.some(id => id === cid)) {
|
||||
|
Loading…
Reference in New Issue
Block a user