Reputation: 305
I have below folders
src
-common
-> test.js
-views
->test
-1.vue
I need to call common folder in 1.vue
.
I have tried below script, but its not working.
import { common } from '../common'
Is there any suggestion on how can I call common folder from 1.vue
?
Upvotes: 0
Views: 153
Reputation: 358
If test.js is a default export then:
import Test from '../../common/test';
If it's a named export then:
import { Test } from '../../common/test';
Upvotes: 2