I have an NPM library called 'example-lib' (built with Rollup) and a Vite React-TS project. I want to test 'example-lib' in my Vite project using npm link.
in library:
npm link
in project:
npm link @mjana/example-lib
However, I'm encountering an error stating 'Cannot find module' when importing components.
import { ComponentA } from "@mjana/example-lib"
I also tried using 'npm pack', which created a .tgz file. I then copied the file into my project directory and installed it using npm install. Surprisingly, this method works without any issues. Can you help me understand why 'npm link' isn't working for me?