mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
fixClientManifest no needed as of vue 2.3.1
This commit is contained in:
parent
8a25da81fb
commit
affbc9c81f
12
lib/build.js
12
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
|
||||
|
Loading…
Reference in New Issue
Block a user