From bae698c9ad314c1815f8eefd5f6dc4b4d09fa103 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 28 Aug 2017 22:59:09 +0800 Subject: [PATCH] update vue-loader --- package.json | 2 +- src/router/_import_development.js | 2 +- src/router/index.js | 2 +- src/views/dashboard/index.vue | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 93375a01..c29e8257 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "semver": "5.3.0", "style-loader": "0.17.0", "url-loader": "0.5.8", - "vue-loader": "12.2.1", + "vue-loader": "13.0.4", "vue-style-loader": "3.0.1", "vue-template-compiler": "2.4.2", "webpack": "2.6.1", diff --git a/src/router/_import_development.js b/src/router/_import_development.js index dfa4bb95..84bf7a91 100644 --- a/src/router/_import_development.js +++ b/src/router/_import_development.js @@ -1 +1 @@ -module.exports = file => require('@/views/' + file + '.vue') +module.exports = file => require('@/views/' + file + '.vue').default diff --git a/src/router/index.js b/src/router/index.js index b2e79253..35f823b1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ import Vue from 'vue' import Router from 'vue-router' const _import = require('./_import_' + process.env.NODE_ENV) -// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow.so only in production use Lazy Loading +// in development env not use Lazy Loading,because Lazy Loading too many pages will cause webpack hot update too slow.so only in production use Lazy Loading Vue.use(Router) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index e347595d..0fd01f6f 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -23,7 +23,6 @@ export default { ]) }, created() { - console.log(this.roles) if (this.roles.indexOf('admin') >= 0) { return }