'How to import a dependency's .vue file

I encountered this line of code in a vue project here https://github.com/InfinetyEs/Nova-Filemanager/blob/c6595c29e23cab01be6b7e37a069b13844397c91/resources/js/modules/Image.vue#L42:

import Viewer from 'v-viewer/src/component.vue';

I know from other examples that v-viewer is the dependency, so src/component.vue isn't part of this project. However, those other examples are only importing the dependency, i.e. import Viewer from 'v-viewer'.

The issue I'm facing is that npm run dev is complaining that it cannot find the dependency and I have practically 0 experience with vue.

What is the proper way to write the above so that it is pulling component.vue from the dependency v-viewer?

Thank you!

UPDATE: I wrote this import { component } from 'v-viewer' and it compiled. Appreciate if someone can confirm and explain if what I'm doing is correct.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source