0

I use Vite bundler. I have a script that imports SimpleLightbox (installed with 'npm i simplelightbox') and its CSS, and at this point I get an invalid MIME type error. When I run the server through 'npm run dev' everything works fine unlike 'npm run preview' or the VS Code extension 'Live Server'.

Here is my importing code, maybe it's wrong, I don't know: import simplelightbox from '../../node_modules/simplelightbox'; import '../../node_modules/simplelightbox/dist/simple-lightbox.min.css';

I searched internet and tried to ask Copilot

0

Browse other questions tagged or ask your own question.