maxmarinich / react-alice-carousel

React responsive component for building content galleries, content rotators and any React carousels
MIT License
832 stars 91 forks source link

Support for CSS/SCSS modules #286

Closed M1K3Yio closed 1 year ago

M1K3Yio commented 1 year ago

We are using this React component within our NX monorepo. Currently we are importing this in a nextjs library, which we then import into our nextjs app. While updating our version of nextjs, we identified as issue where Global CSS Must Be in Your Custom which recommends imports within app.js or css modules, which is the best approach.

Failed to compile.

../../node_modules/react-alice-carousel/lib/alice-carousel.css
Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
maxmarinich commented 1 year ago

Hi, @M1K3Yio! Provide the code samle. What's about:

@import "react-alice-carousel/lib/scss/alice-carousel.scss"