mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fixClientManifest no needed as of vue 2.3.1
This commit is contained in:
parent
8a25da81fb
commit
affbc9c81f
10
lib/build.js
10
lib/build.js
@ -43,10 +43,6 @@ let webpackStats = 'none'
|
|||||||
// force green color
|
// force green color
|
||||||
debug.color = 2
|
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 = {
|
const defaults = {
|
||||||
analyze: false,
|
analyze: false,
|
||||||
publicPath: '/_nuxt/',
|
publicPath: '/_nuxt/',
|
||||||
@ -110,7 +106,7 @@ export function options () {
|
|||||||
if (fs.existsSync(bundlePath) && fs.existsSync(manifestPath)) {
|
if (fs.existsSync(bundlePath) && fs.existsSync(manifestPath)) {
|
||||||
const bundle = fs.readFileSync(bundlePath, 'utf8')
|
const bundle = fs.readFileSync(bundlePath, 'utf8')
|
||||||
const manifest = fs.readFileSync(manifestPath, '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)
|
addAppTemplate.call(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -436,7 +432,7 @@ function webpackWatchAndUpdate () {
|
|||||||
} else {
|
} else {
|
||||||
const bundle = serverFS.readFileSync(bundlePath, 'utf8')
|
const bundle = serverFS.readFileSync(bundlePath, 'utf8')
|
||||||
const manifest = clientFS.readFileSync(manifestPath, '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
|
this.watchHandler = watchHandler
|
||||||
@ -469,7 +465,7 @@ function webpackRunServer () {
|
|||||||
readFile(bundlePath, 'utf8')
|
readFile(bundlePath, 'utf8')
|
||||||
.then(bundle => readFile(manifestPath, 'utf8')
|
.then(bundle => readFile(manifestPath, 'utf8')
|
||||||
.then(manifest => {
|
.then(manifest => {
|
||||||
createRenderer.call(this, JSON.parse(bundle), fixClientManifest(JSON.parse(manifest)))
|
createRenderer.call(this, JSON.parse(bundle), JSON.parse(manifest))
|
||||||
resolve()
|
resolve()
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user