ssr server plugin: only include js source maps

This commit is contained in:
Evan You 2017-04-23 21:19:58 +08:00
parent 4f9f28cf16
commit 3a621d1860

View File

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