Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jun 7, 2017
1 parent ee0e9c5 commit 9daca7e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"koa-router": "^7.2.0",
"koa-static": "^3.0.0",
"lodash": "^4.17.4",
"lru-cache": "^4.0.2",
"lru-cache": "^4.1.0",
"markdown-it": "^8.3.1",
"mkdirp": "^0.5.1",
"nib": "^1.1.2",
Expand Down Expand Up @@ -65,13 +65,13 @@
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.4.0",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-node": "^5.0.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^2.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.11.1",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.28.0",
"img-loader": "^2.0.0",
"lodash-webpack-plugin": "^0.11.4",
Expand Down
2 changes: 1 addition & 1 deletion server/dev-tools/webpack-hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const debug = _debug('hi:webpack-hmr')
export default compiler => {
debug('Enable Webpack Hot Module Replacement (HMR).')

const middleware = webpackHotMiddleware(compiler)
const middleware = webpackHotMiddleware(compiler, {heartbeat: 5000})
return async function koaWebpackHMR(ctx, next) {
/* eslint prefer-const: 0 */
let hasNext = await applyExpressMiddleware(middleware, ctx.req, ctx.res)
Expand Down
6 changes: 1 addition & 5 deletions src/plugins/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ const {prototype: proto} = Vue

axios.defaults.baseURL = (__SERVER__ ? INNER_SERVER : SERVER_PREFIX) + 'api'

if (!__DEV__ || !proto._$http) {
if (!__DEV__ || !proto.hasOwnProperty('$http')) {
Object.defineProperty(proto, '$http', __SERVER__ ? {
get() {
return this.$ssrContext.axios
}
} : {value: axios})

if (__DEV__) {
proto._$http = true
}
}
17 changes: 12 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@ eslint-plugin-html@^2.0.0:
dependencies:
htmlparser2 "^3.8.2"

eslint-plugin-import@^2.4.0:
eslint-plugin-import@^2.3.0:
version "2.4.0"
resolved "http://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.4.0.tgz#eb468dab7196d8a8b67fdea9223e1660f418eabb"
dependencies:
Expand Down Expand Up @@ -2627,9 +2627,9 @@ file-entry-cache@^2.0.0:
flat-cache "^1.2.1"
object-assign "^4.0.1"

file-loader@^0.11.1:
version "0.11.1"
resolved "http://registry.npm.taobao.org/file-loader/download/file-loader-0.11.1.tgz#6b328ee1234a729e4e47d36375dd6d35c0e1db84"
file-loader@^0.11.2:
version "0.11.2"
resolved "http://registry.npm.taobao.org/file-loader/download/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34"
dependencies:
loader-utils "^1.0.2"

Expand Down Expand Up @@ -4134,13 +4134,20 @@ lru-cache@^3.2.0:
dependencies:
pseudomap "^1.0.1"

lru-cache@^4.0.1, lru-cache@^4.0.2:
lru-cache@^4.0.1:
version "4.0.2"
resolved "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e"
dependencies:
pseudomap "^1.0.1"
yallist "^2.0.0"

lru-cache@^4.1.0:
version "4.1.0"
resolved "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.0.tgz#59be49a683b8d986a939f1ca60fdb6989f4b2046"
dependencies:
pseudomap "^1.0.1"
yallist "^2.0.0"

macaddress@^0.2.8:
version "0.2.8"
resolved "http://registry.npm.taobao.org/macaddress/download/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
Expand Down

0 comments on commit 9daca7e

Please sign in to comment.