From d28240009c4c49fb2ef42a79206f0d9ad03f736c Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Wed, 13 Mar 2019 09:16:44 +0000 Subject: [PATCH] fix(ssr): not push non-async css files into map (#9677) --- src/server/template-renderer/create-async-file-mapper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/template-renderer/create-async-file-mapper.js b/src/server/template-renderer/create-async-file-mapper.js index 64c0647a..c989e33b 100644 --- a/src/server/template-renderer/create-async-file-mapper.js +++ b/src/server/template-renderer/create-async-file-mapper.js @@ -43,8 +43,8 @@ function mapIdToFile (id, clientManifest) { if (fileIndices) { fileIndices.forEach(index => { const file = clientManifest.all[index] - // only include async files or non-js assets - if (clientManifest.async.indexOf(file) > -1 || !(/\.js($|\?)/.test(file))) { + // only include async files or non-js, non-css assets + if (clientManifest.async.indexOf(file) > -1 || !(/\.(js|css)($|\?)/.test(file))) { files.push(file) } })