fix(SSR plugin): use isJS for matching assets (#3387) (#4073)

This commit is contained in:
songyazhao 2018-10-10 16:50:07 +08:00 committed by Pooya Parsa
parent 963b4ddd0f
commit 165c80d94b

View File

@ -43,7 +43,7 @@ export default class VueSSRServerPlugin {
}
stats.assets.forEach((asset) => {
if (asset.name.match(/\.js$/)) {
if (isJS(asset.name)) {
bundle.files[asset.name] = compilation.assets[asset.name].source()
} else if (asset.name.match(/\.js\.map$/)) {
bundle.maps[asset.name.replace(/\.map$/, '')] = JSON.parse(compilation.assets[asset.name].source())