Rollup failed to resolve import "intro.js/introjs.css" when deploying React TypeScript app with Vite and Intro.js
I am trying to integrate Intro.js into my React TypeScript app using Vite as the build tool and deploying it on Vercel. During production, everything works fine locally, but when I deploy the app, I encounter the following error:
I have installed Intro.js as a dependency and imported it in my code like this:
import { Steps } from "intro.js-react";
import "intro.js/introjs.css";
I have also checked that the CSS file exists in the specified path.
Could you please help me understand why Rollup fails to resolve the import for the Intro.js CSS file during deployment and suggest a possible solution?
Thank you!