Skip to content

Commit

Permalink
update ssr tests with local plugin build
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 16, 2017
1 parent a2bff57 commit 5a617cc
Show file tree
Hide file tree
Showing 4 changed files with 271 additions and 272 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"serialize-javascript": "^1.3.0",
"typescript": "^2.1.6",
"uglify-js": "^2.6.2",
"vue-ssr-webpack-plugin": "^3.0.0",
"webpack": "^2.2.0",
"weex-js-runtime": "^0.17.0-alpha4",
"weex-vdom-tester": "^0.1.4"
Expand Down
4 changes: 2 additions & 2 deletions test/ssr/ssr-bundle-render.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import LRU from 'lru-cache'
import { VueSSRServerPlugin } from 'vue-ssr-webpack-plugin'
import { compileWithWebpack } from './compile-with-webpack'
import { createBundleRenderer } from '../../packages/vue-server-renderer'
import VueSSRServerPlugin from '../../packages/vue-server-renderer/server-plugin'

export function createRenderer (file, options, cb) {
if (typeof options === 'function') {
Expand All @@ -25,7 +25,7 @@ export function createRenderer (file, options, cb) {
: []
}, fs => {
const bundle = asBundle
? JSON.parse(fs.readFileSync('/vue-ssr-bundle.json', 'utf-8'))
? JSON.parse(fs.readFileSync('/vue-ssr-server-bundle.json', 'utf-8'))
: fs.readFileSync('/bundle.js', 'utf-8')
const renderer = createBundleRenderer(bundle, options)
cb(renderer)
Expand Down
2 changes: 1 addition & 1 deletion test/ssr/ssr-template.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import webpack from 'webpack'
import Vue from '../../dist/vue.runtime.common.js'
import { VueSSRClientPlugin } from 'vue-ssr-webpack-plugin'
import { compileWithWebpack } from './compile-with-webpack'
import { createRenderer } from '../../packages/vue-server-renderer'
import VueSSRClientPlugin from '../../packages/vue-server-renderer/client-plugin'
import { createRenderer as createBundleRenderer } from './ssr-bundle-render.spec.js'

const defaultTemplate = `<html><head></head><body><!--vue-ssr-outlet--></body></html>`
Expand Down
Loading

0 comments on commit 5a617cc

Please sign in to comment.