Skip to content

Commit

Permalink
fix(vue-app): moved component register hooks to extra file and import…
Browse files Browse the repository at this point in the history
…ed it before anything else
  • Loading branch information
exreplay committed Jun 14, 2019
1 parent 27fe2e7 commit b64f6e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 1 addition & 6 deletions packages/vue-app/lib/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './register-component-hooks';
import Vue from 'vue';
import Component from 'vue-class-component';
import VueI18n from 'vue-i18n';
import axios from 'axios';
import App from '@/App.vue';
Expand Down Expand Up @@ -39,11 +39,6 @@ axios.interceptors.response.use((response) => {
return Promise.reject(error);
});

Component.registerHooks([
'asyncData',
'metaInfo'
]);

export function createApp(ssrContext) {
const i18nConfig = {
locale: 'de',
Expand Down
6 changes: 6 additions & 0 deletions packages/vue-app/lib/register-component-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Component from 'vue-class-component';

Component.registerHooks([
'asyncData',
'metaInfo'
]);

0 comments on commit b64f6e4

Please sign in to comment.