Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm package esm sass css import #24

Closed
wsdnathan opened this issue Mar 17, 2022 · 1 comment · Fixed by #25
Closed

npm package esm sass css import #24

wsdnathan opened this issue Mar 17, 2022 · 1 comment · Fixed by #25
Labels
bug Something isn't working

Comments

@wsdnathan
Copy link

wsdnathan commented Mar 17, 2022

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 nicped added the bug Something isn't working label Mar 18, 2022
@nicped nicped linked a pull request Mar 18, 2022 that will close this issue
@nicped
Copy link
Member

nicped commented Mar 18, 2022

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants