From 407569480b7ef5fa016a919f4185a0a851bf0b43 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 23 Oct 2017 17:27:30 +0800 Subject: [PATCH] refactor: use nuxt-class-component in example --- examples/vue-class-component/nuxt.config.js | 3 --- examples/vue-class-component/package.json | 3 ++- .../plugins/nuxt-class-component.js | 14 -------------- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 examples/vue-class-component/plugins/nuxt-class-component.js diff --git a/examples/vue-class-component/nuxt.config.js b/examples/vue-class-component/nuxt.config.js index 4e7a3097a9..4d32a9ca0a 100644 --- a/examples/vue-class-component/nuxt.config.js +++ b/examples/vue-class-component/nuxt.config.js @@ -2,9 +2,6 @@ module.exports = { build: { babel: { plugins: ['transform-decorators-legacy', 'transform-class-properties'] - }, - extend (config) { - config.resolve.alias['nuxt-class-component'] = '@/plugins/nuxt-class-component' } } } diff --git a/examples/vue-class-component/package.json b/examples/vue-class-component/package.json index e672615065..89e9d65c2a 100644 --- a/examples/vue-class-component/package.json +++ b/examples/vue-class-component/package.json @@ -4,7 +4,8 @@ "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "nuxt": "latest", - "vue-class-component": "^5.0.1" + "nuxt-class-component": "^1.0.3", + "vue": "~2.4.2" }, "scripts": { "dev": "nuxt", diff --git a/examples/vue-class-component/plugins/nuxt-class-component.js b/examples/vue-class-component/plugins/nuxt-class-component.js deleted file mode 100644 index 2f5188d00b..0000000000 --- a/examples/vue-class-component/plugins/nuxt-class-component.js +++ /dev/null @@ -1,14 +0,0 @@ -import Component from 'vue-class-component' - -Component.registerHooks([ - 'beforeRouteEnter', - 'beforeRouteLeave', - 'asyncData', - 'fetch', - 'middleware', - 'layout', - 'transition', - 'scrollToTop' -]) - -export default Component