I am creating a node_module with Vue SFC components for consumption of different projects.
So on my module's index.js (main entry point), I have this:
import component1 from './src/input-box1.vue'
import component2 from './src/input-box2.vue'
export default component1
Above works well for component1 but I don't know how to export component2.
I tried doing this:
export { component1 }
export { component2 }
But I'm getting an error:
Unknown custom element: <component1> - did you register the component correctly? For recursive components, make sure to provide the "name" option
Import is like this:
import component1 from 'sample-vue-components'
Any ideas??
export default { component1, component2, ... }orexport component1; export component2; ..