Answer the question
In order to leave comments, you need to log in
How to correctly include Vue and a file with Vue directives in Webpack with Babel?
I swear that I
Uncaught ReferenceError: Vue is not defined
connect Vue as a
File with custom directives
An example of the simplest first directive
window.Vue = require('./src/8/vue');
import './src/6/directives';
Vue.directive('get', {
bind: function (el, binding, vnode) {
let scope = vnode.context;
axios
.get(scope.geturl)
.then((_json) => {
scope.setItems(_json.data.items);
});
}
});
Answer the question
In order to leave comments, you need to log in
Understood what was the matter. It was necessary to overturn Vue inside the directives file via import
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question