-
-
Save matsieftw/5d14024723adbcb7361ad435f6ee354a to your computer and use it in GitHub Desktop.
Barrel Exporting Not Working for Vue Components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// components/header/ComponentC.vue -- sibling component that imports from barrel | |
import { ComponentA, ComponentB } from '~/components` | |
// importing from the barrel results in a component registration error | |
// importing the files directly works fine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// components/index.js -- component barrel export file | |
// header components | |
import ComponentA from './header/ComponentA.vue' | |
import ComponentB from './header/ComponentB.vue' | |
import ComponentC from './header/ComponentC.vue' | |
export { ComponentA, ComponentB, ComponentC } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment