maxmarinich/react-alice-carousel

Support for CSS/SCSS modules

Closed this issue · 1 comments

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).

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

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