fix(ssr): check js assets more accurate in ssr webpack plugin (#8639)

This commit is contained in:
Clark Du 2018-11-30 22:32:28 +00:00 committed by Evan You
parent 4ecc21c29e
commit 5624278fbe

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())