Miscelaneous fixes for WP

This commit is contained in:
Dane Everitt 2019-02-02 18:49:51 -08:00
parent 91cf735646
commit ea923053eb
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 13 additions and 7 deletions

View file

@ -16,9 +16,7 @@ import router from './router';
Vue.config.productionTip = false;
require('./bootstrap');
// @ts-ignore
window.events = new Vue();
// @ts-ignore
window.Ziggy = Ziggy;
Vue.use(Vuex);
@ -26,7 +24,6 @@ Vue.use(VueRouter);
Vue.use(VeeValidate);
Vue.use(VueI18n);
// $FlowFixMe: this is always going to be unhappy because we ignore the vendor dir.
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
Vue.mixin({methods: {route}});
@ -37,7 +34,6 @@ const i18n = new VueI18n({
messages: {...Locales},
});
// $FlowFixMe
if (module.hot) {
module.hot.accept();
}

View file

@ -4,6 +4,8 @@ import {FlashInterface} from "./mixins/flash";
import {AxiosInstance} from "axios";
import {Vue as VueType} from "vue/types/vue";
import {ApplicationState} from "./store/types";
// @ts-ignore
import {Ziggy} from './helpers/ziggy';
declare global {
interface Window {
@ -13,6 +15,7 @@ declare global {
jQuery: any,
axios: AxiosInstance,
events: VueType,
Ziggy: Ziggy,
}
}