just assign the require to a variable. (That's how I do it).
app.css
window.lightbox = require('lightbox2')
Then on your code you can just use it globally:
lightbox.{method}
Hey, I try to add lightbox2 to my laravel 9 project. So I did
npm install lightbox2 --save
and in resources/js/app.js I added
require('lightbox2');
After "npm run dev" I got the javascript part into my public/js/app.js file.
But how can I add the lightbox CSS to my compiled or generated app.css ??? I have no experience with postCSS or mix. Hope somebody can help.
Please or to participate in this conversation.