Browse Source

fix(ssr): avoid missing files in manifest (#11609)

Co-authored-by: chenyj <2932802684@qq.com>
Co-authored-by: johnleider <john@vuetifyjs.com>
dev
Eduardo San Martin Morote 4 years ago
committed by GitHub
parent
commit
b97606cdc6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/server/template-renderer/create-async-file-mapper.js

6
src/server/template-renderer/create-async-file-mapper.js

@ -44,7 +44,11 @@ function mapIdToFile (id, clientManifest) {
fileIndices.forEach(index => {
const file = clientManifest.all[index]
// only include async files or non-js, non-css assets
if (clientManifest.async.indexOf(file) > -1 || !(/\.(js|css)($|\?)/.test(file))) {
if (
file &&
(clientManifest.async.indexOf(file) > -1 ||
!/\.(js|css)($|\?)/.test(file))
) {
files.push(file)
}
})

Loading…
Cancel
Save