mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 21:17:55 +08:00
fix(ssr): check js assets more accurate in ssr webpack plugin (#8639)
This commit is contained in:
parent
4ecc21c29e
commit
5624278fbe
@ -43,7 +43,7 @@ export default class VueSSRServerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stats.assets.forEach(asset => {
|
stats.assets.forEach(asset => {
|
||||||
if (asset.name.match(/\.js$/)) {
|
if (isJS(asset.name)) {
|
||||||
bundle.files[asset.name] = compilation.assets[asset.name].source()
|
bundle.files[asset.name] = compilation.assets[asset.name].source()
|
||||||
} else if (asset.name.match(/\.js\.map$/)) {
|
} else if (asset.name.match(/\.js\.map$/)) {
|
||||||
bundle.maps[asset.name.replace(/\.map$/, '')] = JSON.parse(compilation.assets[asset.name].source())
|
bundle.maps[asset.name.replace(/\.map$/, '')] = JSON.parse(compilation.assets[asset.name].source())
|
||||||
|
Loading…
Reference in New Issue
Block a user