The requested module './clienteMixin.js' does not provide an export named 'default'
Mixin
export const myMixin = {
data() {
return {
loading: false,
}
}
}
Vue App
import myMixin from './clienteMixin.js'
var app = new Vue({
delimiters: ['[[', ']]'],
el: '#app',
components:{},
mixins: [myMixin],
data() {
return {
}
},
methods: {
},
mounted () {
}
});
First change your export to use the default export:
export default {
data() {
return {
loading: false,
}
},
}
This will fix the import issue. If you want your mixin to be a global mixin, use Vue.mixin:
import myMixin from './clienteMixin.js'
Vue.mixin(myMixin);
const app = new Vue({
delimiters: ['[[', ']]'],
el: '#app',
components:{},
data() {
return {
}
},
methods: {
},
mounted () {
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With