dynamicweb / swiffy-slider

Super fast carousel and slider with touch for optimized websites running in modern browsers.
MIT License
250 stars 29 forks source link

npm package esm sass css import #24

Closed wsdnathan closed 2 years ago

wsdnathan commented 2 years ago

In my JS I import like this which works: import {swiffyslider} from 'swiffy-slider'; In my scss this doesn't work: @import "~swiffy-slider/dist/css/swiffy-slider.min.css";

Am I doing something wrong? Or does your package need to additionally export the css for NPM, Laravel Mix 6, ES6? Currently you have "exports": "./src/swiffy-slider.esm.js", which works for the js only for me.

nicped commented 2 years ago

Thank you for the feedback. Good catch!

I suggest this change: #25

Then you can use import css from "swiffy-slider/src/swiffy-slider.css"