user10384441
user10384441

Reputation: 143

How do I import a mixin from an embeded folder in components?

This is probably really easy, but i dont know what it's called so i dont know what to google for.

My filestructure is like this:

 src
   ├──components
   |         └──SomeComponentGroup
   |                       └──Button1.vue
   |
   |
   ├──mixins
   |     └──MyMixin.js

How do i import MyMixin from Button1? import MyMixin from '../mixins/MyMixins.js' doesnt work

Upvotes: 0

Views: 110

Answers (2)

user10384441
user10384441

Reputation: 143

Yeah it was really easy. @/mixins/MyMixins.js; was the solution

Upvotes: 1

user10686911
user10686911

Reputation:

Am I missing something? You just need to go one more up like import MyMixin from '../../mixins/MyMixins.js'

Upvotes: 2

Related Questions