Browse Source

fix(ssr): not push non-async css files into map (#9677)

dev
Xin Du (Clark) 6 years ago
committed by Evan You
parent
commit
d28240009c
  1. 4
      src/server/template-renderer/create-async-file-mapper.js

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

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

Loading…
Cancel
Save