diff --git a/lib/build.js b/lib/build.js index a0d2a0a8a8..c9fcc9d2e6 100644 --- a/lib/build.js +++ b/lib/build.js @@ -43,10 +43,6 @@ let webpackStats = 'none' // force green color debug.color = 2 -// temporary fix for vuejs/vue#5540 until new vue server renderer release -const uniq = require('lodash').uniq -const fixClientManifest = manifest => Object.assign(manifest, {initial: uniq(manifest.initial)}) - const defaults = { analyze: false, publicPath: '/_nuxt/', @@ -110,7 +106,7 @@ export function options () { if (fs.existsSync(bundlePath) && fs.existsSync(manifestPath)) { const bundle = fs.readFileSync(bundlePath, 'utf8') const manifest = fs.readFileSync(manifestPath, 'utf8') - createRenderer.call(this, JSON.parse(bundle), fixClientManifest(JSON.parse(manifest))) + createRenderer.call(this, JSON.parse(bundle), JSON.parse(manifest)) addAppTemplate.call(this) } } @@ -436,7 +432,7 @@ function webpackWatchAndUpdate () { } else { const bundle = serverFS.readFileSync(bundlePath, 'utf8') const manifest = clientFS.readFileSync(manifestPath, 'utf8') - createRenderer.call(this, JSON.parse(bundle), fixClientManifest(JSON.parse(manifest))) + createRenderer.call(this, JSON.parse(bundle), JSON.parse(manifest)) } } this.watchHandler = watchHandler @@ -469,7 +465,7 @@ function webpackRunServer () { readFile(bundlePath, 'utf8') .then(bundle => readFile(manifestPath, 'utf8') .then(manifest => { - createRenderer.call(this, JSON.parse(bundle), fixClientManifest(JSON.parse(manifest))) + createRenderer.call(this, JSON.parse(bundle), JSON.parse(manifest)) resolve() })) }) @@ -489,7 +485,7 @@ function createRenderer (bundle, manifest) { this.renderer = createBundleRenderer(bundle, Object.assign({ cache: cacheConfig, clientManifest: manifest, - runInNewContext: false + runInNewContext: false }, this.options.ssr)) this.renderToString = pify(this.renderer.renderToString) this.renderToStream = this.renderer.renderToStream